Skip to content
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

[jaxrs-resteasy] Make it possible to disable generation of swagger annotations #10003

Open
1 of 6 tasks
tnmtechnologies opened this issue Jul 21, 2021 · 3 comments
Open
1 of 6 tasks

Comments

@tnmtechnologies
Copy link
Contributor

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Today, for jaxrs-resteassy generator, it is not possible to disable the swagger annotations generation.

With maven, a work around is to use com.google.code.maven-replacer-plugin to remove generated swagger code.

openapi-generator version

4.0.2

OpenAPI declaration file content or url
Generation Details
Steps to reproduce

Generate source code with jaxrs-resteassy generator.
Swagger annotations are generated.

Related issues/PRs
Suggest a fix

I will submit a fix soon.

@tnmtechnologies
Copy link
Contributor Author

I need to declare a CLI option and a mustache variable for the JavaJaxrsResteasy generator.

Looking to the existing source code, I found that :

  • useSwaggerAnnotations is used as CLI option and as mustache variable for JavaJaxrsSpec generator,
  • swaggerAnnotations is used as CLI option and as mustache variable for KotlinSpringServer generator.

As we can see, we use 2 different names for the same thing. I think this inconsistency is not good.

I don't know the naming conventions of the project.
Which one of the two names we have to use ? useSwaggerAnnotations or swaggerAnnotations ?

@wing328 @jmini

swaggerAnnotations-search-result

@wing328
Copy link
Member

wing328 commented Aug 1, 2021

@tnmtechnologies thanks for pointing it out. Agreed that the naming should be consistent.Please use swaggerAnnotations and I'll submit a PR later to rename useSwaggerAnnotations

@tnmtechnologies
Copy link
Contributor Author

@wing328 thanks
PR #10013 is ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants