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
When examples are included for an array of strings, the examples do not display in the request body schema.
Context
Would like to display examples just like one gets for standard strings. Attached is an example OpenAPI 3.1.0. document demonstrating the issue. noarrayexamples.example.json
Current Behavior
Array examples do not display.
Expected Behavior
Would like to see array examples.
The text was updated successfully, but these errors were encountered:
hey @kentbulza while this is supported in JSON Schema, but we'll take this as an enhancement request of @stoplight/json-schema-viewer. As a workaround, you can declare examples of the array itself.
{
"type": "object",
"properties": {
"x": {
"type": "array",
"items": {
"type": "string",
"examples": ["bar"] // Don't use this example here
},
"examples": [["foo"], ["abc"]] // Examples here
}
}
}
When examples are included for an array of strings, the examples do not display in the request body schema.
Context
Would like to display examples just like one gets for standard strings. Attached is an example OpenAPI 3.1.0. document demonstrating the issue.
noarrayexamples.example.json
Current Behavior
Array examples do not display.
Expected Behavior
Would like to see array examples.
The text was updated successfully, but these errors were encountered: