-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schemas are blank in html2 generatation #3788
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
Any updates on this? I see the same behavior. |
I ran into the problem that a single schema was blank. In my case this was fixed by turning ... :
schema:
$ref: '#/components/schemas/X'
components:
schemas:
X:
type: array
items:
$ref: '#/components/schemas/Y'
Y:
... into ... :
schema:
type: array
items:
$ref: '#/components/schemas/Y'
components:
schemas:
Y:
... This might be related to this issue. |
Any update on this? I am facing the same issue too. |
May want to try openapigenerator version 6.0.0. Something broke starting with 6.0.1 regarding schema refs when using the html2 generator. #12842 |
This also happened to me on version 6.2.0 (from the Arch repositories), but without using any references. openapi: 3.0.3
info:
title: Minimal example
description: |-
description …
contact:
email: test@example.org
license:
name: proprietary
# url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 0.1
paths:
/test:
post:
operationId: test
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
enabled:
type: boolean
'405':
description: Some reason
security: [] I build the documentation with:
There is an empty box shown where I'd expect the template to be. Edit: Here is the output of the command:
(I have replaced my user name with $USER) |
And I did some further testing. The example above is broken in version 6.0.1 but works in 6.0.0. So it seems to be a regression in version 6.0.1. Oh and I forgot to mention that examples are not rendered as well (yes, the example given above does not include one). |
I pulled the latest openapitools/openapi-generator-cli Docker image: 193486a2ca74
Command:
docker run --rm -w /local -v ${PWD}:/local openapitools/openapi-generator-cli generate -i openapi.yaml -g html2
Opened the generated
index.html
file and saw that all of the schemas were blank. When I ran the html2 generator in https://github.com/swagger-api/swagger-codegen, the schemas were populated.openapi.yaml:
https://raw.githubusercontent.com/PresencePG/grip-server/feature/time-series/documentation/openapi.yaml?token=ABKWFWZBSGDI6FYD4JA4IWS5OAR5Q
The text was updated successfully, but these errors were encountered: