-
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
[Spring] Bug @ApiResponse ignores different responses #3371
Comments
@frasch1712 I don't think the custom error model is supported at the moment. May I know if you've cycle to contribute the enhancement? cc @cbornet |
I investigated a bit in it and think it is only a small change in the mustache template. So I will try to contribute the enhancement. |
And just for the record -- the problem is that the template uses |
@ok11 I don't see any PR from @frasch1712 : https://github.com/swagger-api/swagger-codegen/pulls/frasch1712 For the time being, I would suggest you to file one for review. Thanks. |
I have this same issue. Is there any progress on it? Or maybe a workaround? |
Hi, first of all congrats on this amazing project! Now on to the issue, just a couple of comments:
|
Yes, we want to merge it. Did you have a chance to test the first? Does it work for you?
I would recommend opening a new issue for tracking so as to more easily draw attention from the community. |
@wing328 I have tested the PR and it seems to solve the issue described by @frasch1712. I will open a new issue to describe the other problem. |
Would it be possible to merge #4801 so that I will have a possibility to provide another fix of another issue I spotted around the same feature, before |
@gcernier-amadeus I'll try to merge it later today after resolving the merge conflicts. |
Closed via #4801. Thanks for the fix by @gcernier-amadeus Please pull the latest master to give it a try. |
Description
Swagger Spring Boot Code generation ignores different schema references in responses.
Actually the following is generated:
I would expect the following "response = Error.class for code = 400" (see below for the yaml definition):
Swagger-codegen version
master branch
Swagger declaration file content or url
Declaration in yaml (extract):
Command line used for generation
java -Dmodels -Dapis -jar swagger-codegen-cli.jar generate -i swagger.yaml -l spring
additional config:
The text was updated successfully, but these errors were encountered: