We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
html2 generator ignores "default" and "enum" field and the resulting url is missing a value for the query parameter.
5.1.0
"servers" : [ { "url" : "https://my-cookies/" } ], "paths" : { "/api/v4/cookies/amount" : { "get" : { "summary" : "Summary", "description" : "Description", "operationId" : "get_amount", "parameters" : [{ "name" : "color", "in" : "query", "description" : "Cookie color", "schema" : { "type" : "string", "default" : "red", "enum" : [ "red", "blue", "green", "yellow" ] } } ],
The entire json file and the resulting index.html file can be found here: https://gist.github.com/kas1337/7381b3764fdfe340e272958e5a9a19b8
I've tested with the latest master branch as described here https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator using the following command (Linux)
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g html2 -i openapi.json
The resulting url in the generated documentation is missing the query parameter.
/api/v4/cookies/amount
In the CURL example the query parameter is visible but it looks like it's missing a value
curl -X GET\ -H "Accept: application/pdf,application/json"\ "https://my-cookies/api/v4/cookies/amount?color="
Furthermore, the "default" and "enum" fields are missing in the parameters section. Only the description is displayed.
I would expect something like this for the url
/api/v4/cookies/amount?color={example_color}
as well as for the CURL example.
It would be nice if you could have a look into this. Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report Checklist
Description
html2 generator ignores "default" and "enum" field and the resulting url is missing a value for the query parameter.
openapi-generator version
5.1.0
OpenAPI declaration file content or url
The entire json file and the resulting index.html file can be found here: https://gist.github.com/kas1337/7381b3764fdfe340e272958e5a9a19b8
Generation Details & Steps to reproduce
I've tested with the latest master branch as described here https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator using the following command (Linux)
Actual output
The resulting url in the generated documentation is missing the query parameter.
In the CURL example the query parameter is visible but it looks like it's missing a value
Furthermore, the "default" and "enum" fields are missing in the parameters section. Only the description is displayed.
Expected output
I would expect something like this for the url
/api/v4/cookies/amount?color={example_color}
as well as for the CURL example.
It would be nice if you could have a look into this. Thanks!
The text was updated successfully, but these errors were encountered: