diff --git a/output/marshal.go b/output/marshal.go index ba59c1a..58f8770 100644 --- a/output/marshal.go +++ b/output/marshal.go @@ -71,9 +71,9 @@ func MarshalType(output *Output) (base *CatalogTypeModel, enumTypes []*CatalogTy } if attr.Path != nil { - attribute.Path = lo.ToPtr(lo.Map(attr.Path, func(item *PathAttribute, _ int) client.CatalogTypeAttributePathItemPayloadV2 { + attribute.Path = lo.ToPtr(lo.Map(attr.Path, func(item string, _ int) client.CatalogTypeAttributePathItemPayloadV2 { return client.CatalogTypeAttributePathItemPayloadV2{ - AttributeId: item.AttributeId, + AttributeId: item, } })) } diff --git a/output/output.go b/output/output.go index 64ece44..fac0924 100644 --- a/output/output.go +++ b/output/output.go @@ -47,19 +47,15 @@ func (s SourceConfig) Validate() error { ) } -type PathAttribute struct { - AttributeId string `json:"attribute_id"` -} - type Attribute struct { - ID string `json:"id"` - Name string `json:"name"` - Type null.String `json:"type"` - Array bool `json:"array"` - Source null.String `json:"source"` - Enum *AttributeEnum `json:"enum"` - BacklinkAttribute null.String `json:"backlink_attribute"` - Path []*PathAttribute `json:"path"` + ID string `json:"id"` + Name string `json:"name"` + Type null.String `json:"type"` + Array bool `json:"array"` + Source null.String `json:"source"` + Enum *AttributeEnum `json:"enum"` + BacklinkAttribute null.String `json:"backlink_attribute"` + Path []string `json:"path"` } func (a Attribute) Validate() error {