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

Enhance DSL regarding ApiResponse

Open matanox opened this issue 9 years ago • 1 comments

Not really an issue, but could this be avoided:

new ApiResponse(code = 400, message = "Invalid ID supplied"),
new ApiResponse(code = 404, message = "Pet not found"))) 

By improving the DSL such that this annotation can live next to where you return the codes inside your controller? could it more specifically, wrap around where the response is returned? boilerplate will be reduced....

matanox avatar May 27 '16 08:05 matanox

Yes, I do agree this is not great. Will make sure the annotations are cleaned up in the 2.0 release.

Can you please make sure you have an issue opened in swagger-core? That's where the annotations are defined.

fehguy avatar May 27 '16 15:05 fehguy