swagger-api / swagger-api/swagger-codegen
[SPRING][maven-plugin] swagger-codegen-maven does not recognise the 'bigDecimalAsString' option when generating server stubs
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
swagger-codegen-maven lacks 'bigDecimalAsString' option when building Spring server stubs
Swagger-codegen version
2.3.1
Swagger declaration file content or url
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<id>agency-api</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<bigDecimalAsString>true</bigDecimalAsString> <-- not recognised
<inputSpec>src/main/resources/api.yaml</inputSpec>
<language>spring</language>
<library>spring-boot</library>
<generateSupportingFiles>false</generateSupportingFiles>
<invokerPackage>some.package</invokerPackage>
<apiPackage>some.package</apiPackage>
<modelPackage>some.package</modelPackage>
<configOptions>
<bigDecimalAsString>true</bigDecimalAsString>
<dateLibrary>java8</dateLibrary>
<interfaceOnly>true</interfaceOnly>
<java8>true</java8>
<useBeanValidation>true</useBeanValidation>
<delegatePattern>true</delegatePattern>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
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 issue with the shown swagger-codegen-maven configuration, using src/main/resources/api.yaml and the Spring server-stub generator. Inspect how the Maven plugin passes configuration to the Spring generator and how configOptions are handled. Done means bigDecimalAsString is accepted and affects the generated server stubs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100