-
Notifications
You must be signed in to change notification settings - Fork 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
Java codegen - generates class name Collection<Model>.java #514
Comments
Are you using 2.1.x-M1? That should support the 1.2 swagger specifications. It is possible, however, that your API is not creating valid JSON. Can you share the JSON output? |
Yes, I am using 2.1.2-M1 - java -jar swagger-codegen-distribution-2.1.2-M1.jar -l java -i http://localhost:8080/api-docs/default/bundle-controller
"Collection«Bundle»": {
[
java -jar swagger-codegen-distribution-2.1.2-M1.jar -l java -i http://localhost:8080/api-docs/default/bundle-controller |
@dilipkrish do you think this is an issue with the swagger-springmvc ? |
Closing this since I had created a bug on @springdox - springfox/springfox#620 |
Using the swagger springmvc to generate the swagger spec from a Spring REST impementation.
The Spring REST controller class returns a Collection Ex:
Running the swagger codegen onto the generated swagger spec 1.2(because of swagger springmvc currently only supports 1.2).
Then, changed the Collection<> to List<> and the problem was gone. Just wanted to see if this is a bug.
Lets say if the Spring REST implementation that we have remains the same and we currently use codegen with 1.2 spec. If in future when, swagger springmvc starts producing swagger 2.0 spec. Will the generated code for the model classes and the API/service classes be backward compatible.
The text was updated successfully, but these errors were encountered: