You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are auto-generating our base json-schema files directly from a (graphql) API schema. So enums there are not meant for human consumption and need labels.
We use ui-Schema to augment the generated json-schema files with all necessary presentation layer things (titles, order, etc). The only thing that we dont manage to do is give enums new labels.
How can we approach this?
The text was updated successfully, but these errors were encountered:
I don't think you can do that today, the only ways to label an enum are using oneOf/title or the deprecated & nonstandard enumNames property in the JSON Schema (docs).
The reason we deprecated enumNames is because it's a nonstandard JSON Schema field. I think it could be useful to have a similar feature added to the uiSchema. We'd be happy to review a PR if you are interested in contributing this feature!
Prerequisites
What theme are you using?
core
What is your question?
We are auto-generating our base json-schema files directly from a (graphql) API schema. So enums there are not meant for human consumption and need labels.
We use ui-Schema to augment the generated json-schema files with all necessary presentation layer things (titles, order, etc). The only thing that we dont manage to do is give enums new labels.
How can we approach this?
The text was updated successfully, but these errors were encountered: