swagger-api / swagger-api/swagger-codegen
[swagger, all] enum data for integer parameters are not put into operations data
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I can't reopen the issue #3964 so I post a new issue.
Description
There are 2 problems:
- Proper descriptions for integer enum parameters are not present with
-l swaggerfor array items. As seen from gist,integerEnumparameter is properly dumped, butintegerArrayEnumdoes not containenuminitems. - Proper descriptions for integer enum parameters are not present in
-DdebugOperations. As seen from gist,"isEnum" : trueandallowableValuesare only present for string parameters.
Swagger-codegen version
Current master (2.2.3-SNAPSHOT)
Swagger declaration file content or url
Source JSON: https://gist.github.com/checat/1d9b014e39e9767cf30ba401d2cf18c4#file-source-json
Result JSON: https://gist.github.com/checat/1d9b014e39e9767cf30ba401d2cf18c4#file-swagger-json
debugOperations.json https://gist.github.com/checat/1d9b014e39e9767cf30ba401d2cf18c4#file-debugoperations-json
Command line used for generation
java -DdebugOperations -jar swagger-codegen-cli.jar generate -i source.json -l swagger -o out-swagger >debugOperations.json
Steps to reproduce
Generate and see the problems in the description.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Java CLI generation path invoked by swagger-codegen-cli.jar, using the linked source JSON and the -l swagger command. Compare the generated Swagger JSON and debugOperations.json with the described results; done means integer enum metadata appears for array items and in debug operations, not only for string parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100