swagger-api / swagger-api/swagger-codegen
<dateLibrary>java8</dateLibrary> is ignored
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
using
java8
has no effect at all. the code generated always uses org.threeten.bp.OffsetDateTime.
Swagger-codegen version
2.4.13
Command line used for generation
`
reference-data
<goals>
<goal>generate</goal>
</goals>
<!-- <configHelp>true</configHelp>
https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
-->
<configuration>
<inputSpec>${project.basedir}/src/main/resources/swagger/reference-data-api-2020-04-16.yaml</inputSpec>
<language>java</language>
<configOptions>
<dateLibrary>java8</dateLibrary>
</configOptions>
<generateApis>false</generateApis>
<generateModels>true</generateModels>
<modelPackage>com.eurocontrol.safire.migrationtool.rest.model.referencedata3</modelPackage>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<generateSupportingFiles>false</generateSupportingFiles>
<configOptions>
<sourceFolder>src/gen/java/main</sourceFolder>
</configOptions>
</configuration>
</execution>
`
No matter what I use and how many options from true I set inside , it always uses org.threeten.bp.OffsetDateTime.
is this option really working?
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 by reproducing the Maven plugin execution and input spec path shown in the issue, then trace how configOptions reaches the Java generator's dateLibrary setting. Done means the java8 option changes generated model date types instead of producing org.threeten.bp.OffsetDateTime; check for an existing generator test covering this configuration.
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
- 35/100