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
I am extending a component schema by using allOf. The first component definition (TestPage) contains a property with type, properties and the rest of the schema of the component. The second (Page) one only contains the same property with only a description, which I want to be the same for all extending objects. When using the preview command in the cli, the document I see in the browser has a response sample with said overridden property marked as null, regardless of its definition.
Run this command with these arguments... redocly ...
redocly preview-docs openapi.yaml
See error
The generated response sample for status 200 is this:
{
"content": null,
"page": 0,
"total": 0
}
Expected behavior
I expected the property content declared in TestPage to contain its definition, regardless of being overridden in Page, since the second doesn't contain a schema.
{
"content": [
{
"id": 0,
"name": "This is a test"
}
],
"page": 0,
"total": 0
}
Logs
-
OpenAPI description
-
Redocly Version(s)
1.19.0
Node.js Version(s)
v20.13.1
Additional context
-
The text was updated successfully, but these errors were encountered:
Hi @renke0, thank you for the issue. We know this problem. For now, to get your expected behavior you can replace the order of your items inside AllOf.
Hi @renke0, thank you for the issue. We know this problem. For now, to get your expected behavior you can replace the order of your items inside AllOf.
Describe the bug
I am extending a component schema by using
allOf
. The first component definition (TestPage
) contains a property with type, properties and the rest of the schema of the component. The second (Page
) one only contains the same property with only a description, which I want to be the same for all extending objects. When using the preview command in the cli, the document I see in the browser has a response sample with said overridden property marked asnull
, regardless of its definition.To Reproduce
Steps to reproduce the behavior:
Given this
redocly.yaml
fileNone
And this OpenAPI file(s)
redocly ...
The generated response sample for status 200 is this:
Expected behavior
I expected the property
content
declared inTestPage
to contain its definition, regardless of being overridden inPage
, since the second doesn't contain a schema.Logs
-
OpenAPI description
-
Redocly Version(s)
1.19.0
Node.js
Version(s)v20.13.1
Additional context
-
The text was updated successfully, but these errors were encountered: