-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][jaxrs-cxf] Wrong imports (io.swagger.annotations) #3668
Comments
I've updated the title as this isn't a Maven plugin concern but a concern of the specific generator. I think this is a feature request rather than a bug. There's no expectation that generated code matches the OpenAPI spec version, but it sounds like this is the assumption being made. I don't disagree, I just wanted to clarify. I think it would make sense that if you're generating a server implementation from a 3.x version spec document, that you're implying you'd like a 3.x implementation generated. I don't think the parser exposes the spec version to us, so making this work automatically might require a little finesse. It might make sense to add support for the 3.x annotations and default to those, with a fallback option to the 2.0 annotations. I'm not familiar with this specific generator, so I'll defer to the technical committee for Java. |
So if we update the mustache templates does it work as expected relates to #5556 |
We are generating our spring controllers based on openapi definitions (3.0.0). I would also expect, that the annotations used are from |
But the original query was when we are using jaxrs-cxf not spring-mvc or webflux implementation. |
Bug Report Checklist
Description
Generating code with
<generatorName>jaxrs-cxf-extended</generatorName>
or<generatorName>jaxrs-cxf</generatorName>
create invalid imports:io.swagger.annotations
, as the speclevel of my api is3.0.0
it should useio.swagger.v3.oas.annotations
openapi-generator version
4.1.0
OpenAPI declaration file content or url
Cannot disclose
Command line used for generation
Steps to reproduce
Configure plugin as described, feeding it a speclevel 3 api description
Related issues/PRs
Suggest a fix
use the updated package path in the templates
The text was updated successfully, but these errors were encountered: