-
Notifications
You must be signed in to change notification settings - Fork 52
Unwanted response with http status 200 #189
Comments
Just created a test for this locally and I'm getting the 200 state as well. However, in the test, it's not producing the schema for the 201 and 422 responses, just the 200. |
So the problem is that we create an |
I have the same problem. Every one of my APIs that should return '201 Created' and a JSON response body is showing both 200 and 201:
Using version 1.0.12 of the plugin with Spring MVC and Groovy. |
If u desire to rewrite project to kotlin then i can help, but otherwise I am not much familliar with groovy so I dont know if i can help much. |
Hello,
thx for nice swaggergen plugin.
I run into problem with included HTTP 200 status response when ApiResponses is used. Desired result is to have response with statuses 201 and 422 which are specified in annotation, but generated swagger contains 200, 201, 422.
Using: Kotlin, Spring, plugin version 1.0.8, gradle 6.5
Sample:
Either please do not ignore
@ResponseStatus(HttpStatus.CREATED)
when@ApiResponses
is present or take responses solely from ApiResponses.Problem seems to be https://github.com/gigaSproule/swagger-gradle-plugin/blob/master/plugin/src/main/groovy/com/benjaminsproule/swagger/gradleplugin/reader/SpringMvcApiReader.groovy
generated swagger
The text was updated successfully, but these errors were encountered: