swagger-api / swagger-api/swagger-codegen
[Python][Flask] Generate enum constants
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
No constants generated for swagger enums.
Swagger-codegen version
2.2.3
Swagger declaration file content or url
definitions
FooEnum:
type: string
enum:
- baz
- bar
yields just a stub model file
Command line used for generation
java -jar swagger-codegen-cli.jar generate -l python-flask
Suggest a fix/enhancement
Produce enum constants as is done in the python client models.
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 python-flask generator's model templates and compare them with the Python client model generation, which already produces enum constants. Verify the generated FooEnum model contains constants for baz and bar rather than only a stub.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100