swagger-api / swagger-api/swagger-codegen-generators
[JAVA] type:string format:byte is not mapped to byte[]
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
I have the following property described with the following json:
"hash": {
"type": "string",
"format": "byte"
}
In swagger codegen v2.* this will be generated with type byte[] using resttemplate as library (jackson converts automatically using base64 format string)
In latest swagger codegen v3.09 this will be generated with type string. In this way the caller must do the conversion in base64 format string)
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
Compare the Java output produced by swagger codegen v2.* with the output from v3.09 when the schema uses type string and format byte with the resttemplate library. Check how Jackson handles the generated value and confirm that the generated type and base64 conversion behavior match the v2.* result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100