swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[Java] [JAX-RS] parameters model-package / api-package have no effect

Open pneumcke opened this issue 8 years ago • 6 comments

Description

The parameters model-package and api-package have no effect, java files are being created with package "io.swagger".

Swagger-codegen version

3.0.0

Swagger declaration file content or url

sample petstore.yaml from https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml

Command line used for generation

java -jar swagger-codegen-cli-3.0.0.jar generate -i petstore.yaml -l jaxrs-spec --api-package=test.api --model-package=test.model

Steps to reproduce

Execute command line above. Result is:

src -- gen -- java |-- io | -- swagger | |-- api | | -- PetsApi.java | -- model | |-- Error.java | |-- Pet.java | -- Pets.java -- test -- RestApplication.java

api and model should be in the defined "test" package, just as the RestApplication class.

pneumcke avatar Sep 17 '18 13:09 pneumcke

I have the same problem. Any workarounds?

thejjmiller avatar Oct 12 '18 16:10 thejjmiller

+1 same issue

knap1930 avatar Oct 24 '18 08:10 knap1930

thanks for filing this, gonna try to get it fix asap

HugoMario avatar Oct 24 '18 08:10 HugoMario

duplicate issue here: https://github.com/swagger-api/swagger-codegen-generators/issues/76

knap1930 avatar Oct 24 '18 08:10 knap1930

Fixed in swagger-api/swagger-codegen-generators#560

frantuma avatar Dec 13 '19 15:12 frantuma

This is still an issue for the C# generated code. model-package does not work properly.

smargoli2 avatar Sep 01 '22 08:09 smargoli2