-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
I have a schema where one of the property can optionally be set to "male" or "female" (similary to http://jeremydorn.com/json-editor/ example).
"gender": {
"type": "string",
"enum": [
"male",
"female"
]
}
With the current implementation I HAVE to pick a choice, but according to my schema since this property is not required the user should have the possibility to not set this field. So the UI is forcing me to make a choice whilst this field is not mandatory.
One workaround is introduce a third choice like "other" and that's fine if you have control over the schema but in my case I can't modify the schema just to "please" the UI.
Is there a way to cover this scenario without altering the original json schema ?
This would help integrating the following PR: swagger-api/swagger-ui#1088 I've been working on.
Metadata
Metadata
Assignees
Labels
No labels