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

[JAVA] Bug in generating modelPackage and apiPackage for language jaxrs-spec (it always uses io.swagger) #9886

Closed
gianmarcocalbi opened this issue Nov 24, 2019 · 1 comment

Comments

@gianmarcocalbi
Copy link

Description

In swagger-generate-cli, I am trying to setup the client code generation using -l jaxrs-spec with a custom configuration apiPackage=com.cxp.api.controllers and modelPackage=com.cxp.models, but when generating, the package is always io.swagger.api and io.swagger.model, respectively.

Swagger-codegen version

3.0.14

Swagger declaration file content or url

I used the petstore here as specification https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml

and the following configuration file config.json

{
  "modelPackage": "com.cxp.api.models",
  "apiPackage": "com.cxp.api.controllers",
  "invokerPackage": "com.cxp.api",
  "groupId": "com.cxp",
  "artifactId": "api-spec",
  "artifactVersion": "0.0.3",
  "developerOrganization": "CXP",
  "sourceFolder": "src/main/java",
  "serializableModel": true,
  "hideGenerationTimestamp": true,
  "dateLibrary": "java8",
  "java8": true,
  "implFolder": "src/main/java",
  "title": "CXP API Specifications",
  "useBeanValidation": true,
  "interfaceOnly": true
}
Command line used for generation
java -jar swagger-codegen-cli.jar generate -i ./sample/petstore.yaml -o ./sample/out -c ./sample/config.json -l jaxrs-spec
Steps to reproduce
  1. download the petstore
  2. create a configuration file equal to my config.json
  3. generate with the command line using -l jaxrs-spec, -i petstore.yaml and -c config.json
  4. see in the generated project that packages are io.swagger... and not those defined in the config.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant