contentstack / ui-extensions-sdk

The function of Contentstack's UI can be extended by adding custom widgets and fields through extensions. The following Extensions SDK gives an overview of different custom extensions for you to add to the Contentstack app.
MIT License
21 stars 12 forks source link

getContentType does not support global fields. #10

Closed kasperpihl closed 4 years ago

kasperpihl commented 4 years ago

The getContentType api does not support global fields. I'm expecting this api: extension.stack.getContentType('global_field_uid') To return the schema for a global field, but it throws a 422

I have also tried this api: extension.stack.getContentTypes()

But that does not either return any global fields.

Setting the { include_global_field_schema: true } query param has no effect either.

Am I doing something wrong or is this not supported in the extension api?

kasperpihl commented 4 years ago

Resolved this by using includeSchema() on the entry. Then it includes the schema to the global field 👍