OpenAPITools / OpenAPITools/openapi-generator
[REQ] Move X_OPERATION_EXTRA_ANNOTATION to AbstractJavaCodegen
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
x-operation-extra-annotation provides a possibility to add e.g. @RolesAllowed annotation in SpringCodegen
Describe the solution you'd like
Move the vendor extension up the hierarchy to AbstractJavaCodegen so that other java generators (jaxrs-spec, etc.) could profit from it.
It would also make it consistent with current implementation which includes both x-class-extra-annotation and x-field-extra-annotation, see https://github.com/rodrigoma3/openapi-generator/blob/e2f8436ab2bc800e6378e804118181e0550cac53/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java#L2323-L2324
Describe alternatives you've considered
None
Additional context
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 comparing the x-operation-extra-annotation handling in SpringCodegen with the existing x-class-extra-annotation and x-field-extra-annotation handling in AbstractJavaCodegen. Trace how the jaxrs-spec generator uses the shared Java base, then verify that the extension works for other Java generators while preserving the current SpringCodegen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100