-
Notifications
You must be signed in to change notification settings - Fork 304
Description
Describe the bug
When using allOf in array items, it does not output/render the schema drill down.
The example is rendered fine.
Expected behavior
The schema should be output correctly and expandable showing all properties
Current behavior
All the attributes of the array are missing from the schema
Possible solution
The object passed to the StatusCodes component, does not have allOf merged together, the plugin needs to generate markdown with the items of allOf merged, rather than outputting the allOf property?
If it's correct to output the allOf, then maybe the issue lies in lack of support for allOf in ResponseSchema` component or something it's composed of.
Steps to reproduce
- Create a path with a response schema
- Setup the response schema to include an property that is an array using
allOfwithinitems
example:
responses:
'200':
description: List of resources
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
allOf:
- properties:
one:
type: string
- properties:
two:
type: string
Screenshots
Context
I am unable to make up complex responses made up of refs, although the issue isn't specific to using refs as demonstrated, the issue seems to be specific to using allOf within an array items
Could it be something missing in the mergeAllOf method
Object passed in markdown looks to have everything correct passed to the StatusCodes component but the items contains the allOf property still, it's objects haven't been merged. Should they have?
"200": {
"description": "List of resources",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"allOf": [
{ "properties": { "one": { "type": "string" } } },
{ "properties": { "two": { "type": "string" } } },
]
}
}
}
}
}
}
}
Your Environment
- Version used: 4.3.7
- Environment name and version: Chrome 134
- Operating System and version (desktop or mobile): Either
- Link to your project:

