swagger-api / swagger-api/swagger-codegen
[Java] TypeMappings/ImportMappings don't work for Date/DateTime
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
This is because joda which is now the default overrides those values. It also happens if you choose java8 (for example, you choose java8 and want to change OffsetDateTime to Instant or ZonedDateTime).
Note : the workaround is to set dateLibrary to "custom" or "legacy" or "whatever"
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
No file or test is named in the issue. Start by reproducing the Java generator behavior with the joda and java8 date libraries, comparing TypeMappings and ImportMappings against the documented custom or legacy workaround. Done means user-provided mappings for Date/DateTime, including OffsetDateTime, Instant, and ZonedDateTime, take effect without changing dateLibrary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100