swagger-api / swagger-api/swagger-codegen
[Swift3] Illegal enum value null for parameter type integer
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
[Swift3]
Description
"Parameter Object" with integer type and enum collection with 0 generates an error:
[main] WARN io.swagger.models.parameters.AbstractSerializableParameter - Illegal enum value null for parameter type integer
Swagger-codegen version
2.2.2
Swagger declaration file content or url
"filter_type": {
"description": "0=NONE,1=TYPE_1,2=TYPE_2,3=TYPE_3",
"type": "integer",
"enum": [
0,
1,
2,
3
]
},
Command line used for generation
java -jar shared/swagger-codegen-cli.jar generate -i etc/swagger/swagger.json -l swift3 -o shared/swift_client
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
Run the stated Java command with etc/swagger/swagger.json and inspect the generated output in shared/swift_client. Start by tracing how the Swift3 generator handles the integer enum containing 0; done means generation no longer emits the illegal enum value null warning and the enum values are preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100