swagger-api / swagger-api/swagger-codegen
[Question]: swagger-codegen-maven-plugin jakarta.annotation and booleanGetterPrefix
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Question
How to configure swagger-codegen-maven-plugin 3.0.76 to generate only @jakarta.annotation.Nonnull annotations on fields instead of @NotNull validation annotations? I want Jakarta annotation without bean validation.
Second question:
How to use booleanGetterPrefix?. For now this parameter doesnt work
Is that an option?
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.76</version>
<executions>
<execution>
<id>generate-allegro-api</id>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/allegro/allegro-swagger.yaml</inputSpec>
<language>spring</language>
<output>${project.basedir}</output>
<modelPackage>com.allegroclient.model</modelPackage>
<generateSupportingFiles>false</generateSupportingFiles>
<generateApis>false</generateApis>
<generateModelDocumentation>false</generateModelDocumentation>
<generateModelTests>false</generateModelTests>
<configOptions>
<sourceFolder>src/main/java</sourceFolder>
<useJakartaEe>true</useJakartaEe>
<jakarta>true</jakarta>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<openApiNullable>true</openApiNullable>
<useBeanValidation>true</useBeanValidation>
<booleanGetterPrefix>get</booleanGetterPrefix>
</configOptions>
</configuration>
<goals>
<goal>generate</goal>
</goals>
</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
Reproduce the configuration with swagger-codegen-maven-plugin 3.0.76, using the shown useJakartaEe, jakarta, useBeanValidation, and booleanGetterPrefix options. Inspect the generated Java annotations and boolean getter names to compare them with the requested behavior. Done means determining whether these options are supported and identifying the relevant configuration or template change.
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
- Needs clarification
- Newbie friendliness
- 35/100