Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG][HTML] Parameter names garbled in generated documentation, '-' is replaced with 'Minus' #11292

Open
lpar opened this issue Jan 12, 2022 · 0 comments

Comments

@lpar
Copy link

lpar commented Jan 12, 2022

Description

Parameter names are garbled in html output, - is replaced with Minus in parameter names.

openapi-generator version

5.3.1

OpenAPI declaration file content or url

See modified petstore.yaml gist

Generation Details / Steps to Reproduce
curl https://gist.githubusercontent.com/lpar/4af360f8a2c94d2a31c6e12062f2812c/raw/1a11fd965c099669677f3b79c4eecbb73e4f34b8/petstore2.yaml > petstore2.yaml
mkdir petstore
npx openapi-generator-cli version-manager set 5.3.1
npx openapi-generator-cli generate -i petstore2.yaml -g html -o petstore
grep Minus petstore/index.html
Related issues/PRs

Somewhat related to #6465, which is a similar problem in html2 affecting HTTP headers.

Suggest a fix

I'm guessing that the templates for html are using a variable which contains a parameter name that has been sanitized for code generation. Presumably html2 uses the correct variable name (at least for parameters), as it doesn't have the same bug.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant