Skip to content
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

The HTML2 generator produces broken/missing Response Schema schemaWrapper JavaScript variable value. #11953

Closed
ekangas1 opened this issue Nov 9, 2022 · 2 comments

Comments

@ekangas1
Copy link

ekangas1 commented Nov 9, 2022

Description

As of recent releases, the HTML2 generator produces HTML with broken JavaScript. In particular, it produces assignment lines with the right hand side object missing. I.e.,

schemaWrapper = ;

This causes the "Scema" area of the documentation to not populate and causes the HTML export to be not useful.

Swagger-codegen version

This is impacted by the latest version of the code. It has been impacting the code for at least several months -- it impacted our HomeBrew download in September and now impacts the tools exposed live on swatterhub.com

See: attached api.yaml (that produced properly working API docs in the past) and the api.html of a current export that shows the JavaScript errors.

Command line used for generation

From the command line on Mac/HomeBrew you can reproduce:

swagger-codegen generate -i ./api.yaml -l html2 -o ./html2-generated

You can also reproduce through the UI on swaggerhub.com.

Example-Files.zip

@ekangas1
Copy link
Author

Same issue even if I reduce the YAML to only 1 function and 36 lines of YAML. See the YAML and the output code that has the broken response responses schemaWrapper. Note that the YAML validates just fine.

SimplifiedExample.zip

@ekangas1 ekangas1 changed the title The HTML2 generator produces broken JavaScript as of recent releases The HTML2 generator produces broken/missing Response Schema schemaWrapper JavaScript variable value. Nov 14, 2022
@ekangas1
Copy link
Author

homebrew update of swaggerhub-codegen resolves it -- so this is now fixed in the latest release (but on on swagger hub itself)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant