OpenAPITools / OpenAPITools/openapi-generator
[BUG][Java] Cannot turn off swagger annotations. -> swaggerAnnotations: false doesn't work.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
I am using the following parameters in a gradle task:
configOptions = [
dateLibrary: "java8",
annotationsLibrary: "none"
]
additionalProperties = [
swaggerAnnotations: false,
]
None of the assigned parameters doesn't turn off the annotations by swagger using JAVA generator.
Applied OPEN-GENERATOR Gradle plugin as following:
plugins {
id "org.openapi.generator" version "5.4.0"
}
Also referring to the previous cases and "solutions".
_This PR doesn't disable all usages of swagger-annotations in 'java' generator templates, opened a more complete one
Originally posted by @baurchanu in https://github.com/OpenAPITools/openapi-generator/issues/8801#issuecomment-943226459_
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 with the Java generator templates and the Gradle configuration shown in the issue, then compare the existing swagger-annotations handling with the more complete PR referenced in the report. Done means setting annotationsLibrary to none or swaggerAnnotations to false removes all swagger-annotations usages from generated Java output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100