elements
elements copied to clipboard
Schema view has no example for root allOf
Describe the bug
When an OpenAPI components.schema contains a schema which has a root allOf, it fails to generate an example on the model view.
To Reproduce
- Given this OpenAPI demo: https://elements-demo.stoplight.io/?spec=https://api.apis.guru/v2/specs/1password.com/events/1.0.0/openapi.json#/schemas/CursorCollection
- No example on the right
Expected behavior
I'd expect the allOf to be "flattened" so that we see all of the cursor properties and the has_more property, and that all should show up as an example on the right.
Additional context
The cursor is defined like this:
"CursorCollection": {
"allOf": [
{
"$ref": "#/components/schemas/Cursor"
},
{
"properties": {
"has_more": {
"description": "Whether there may still be more data to fetch using the returned cursor. If true, the subsequent request could still be empty.",
"type": "boolean"
}
}
}
],
"description": "Common cursor properties for collection responses"
},
The full OpenAPI file is this: https://api.apis.guru/v2/specs/1password.com/events/1.0.0/openapi.json
Screenshots
(related to Zendesk ticket #6260)
gz#6260
Similar, maybe related bug, notice how the description is also missing in the generated docs.