Skip to content

Generate term_uid for CmsTaxonomy type #213

@niksajanjic

Description

@niksajanjic

If we add taxonomy field to some content type, CLI would generate taxonomy type in this manner:

export interface CmsTaxonomy {
  taxonomy_uid: string
  max_terms?: number
  mandatory: boolean
  non_localizable: boolean
}

export interface CmsTest  extends CmsSystemFields {
  taxonomies?: CmsTaxonomy[]
}

Unfortunately, taxonomies type is missing term_uid: string which we have to type manually because we use it in a codebase. This is what a call to the CMS returns:

{
  taxonomies: [{
    taxonomy_uid:  "test_taxonomy",
    term_uid:  "test_term"
  }]
}

It is not being generated by --include-system-fields flag which adds other metadata including uid which is generated inside CmsSystemFields type.

Is there a reason we're not getting term_uid?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions