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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
A response or a request body with oneOf generates empty response schema, and mostly empty/incomplete body parameters schema with the html2 generator.
openapi-generator version
Using 5.4.0. Also reproduced in 6.0.0 and master. 6.0.1 has an additional problem with a JavaScript syntax error, which appears to have been fixed in master already, so wasn't able to test there.
use the above linked openapi.yaml and run as: openapi-generator-cli generate -g html2 -i openapi.yaml -o generated
Steps to reproduce
Generate the html doc with the above. Open in e.g. chrome and notice that the getPets response schema is empty, and the createPet body parameter section has no detail. There are errors in the dev tools console like
index.html:11 Uncaught TypeError: Cannot read properties of null (reading 'appendChild')
at index.js:16:36
at Array.forEach (<anonymous>)
at JSONSchemaView.appendXOf (index.js:16:36)
at JSONSchemaView.appendChildren (index.js:366:4)
at JSONSchemaView.render (index.js:320:10)
at HTMLDocument.<anonymous> (index.html:1233:22)
at j (index.html:11:29568)
at k (index.html:11:29882)
Related issues/PRs
Suggest a fix
oneOf should be allowed in response or body parameter. For us, especially in the response. We have a number of operations which can return one of a number of classes deriving from a common base model, as seen in this example.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
A response or a request body with oneOf generates empty response schema, and mostly empty/incomplete body parameters schema with the html2 generator.
openapi-generator version
Using 5.4.0. Also reproduced in 6.0.0 and master. 6.0.1 has an additional problem with a JavaScript syntax error, which appears to have been fixed in master already, so wasn't able to test there.
OpenAPI declaration file content or url
minimal spec to repro it here: https://gist.github.com/pbarnes-tibco/fc6320658db878262a1adc3696ea06ec
Generation Details
use the above linked openapi.yaml and run as:
openapi-generator-cli generate -g html2 -i openapi.yaml -o generated
Steps to reproduce
Generate the html doc with the above. Open in e.g. chrome and notice that the getPets response schema is empty, and the createPet body parameter section has no detail. There are errors in the dev tools console like
Related issues/PRs
Suggest a fix
oneOf should be allowed in response or body parameter. For us, especially in the response. We have a number of operations which can return one of a number of classes deriving from a common base model, as seen in this example.
The text was updated successfully, but these errors were encountered: