swagger-api / swagger-play

Apache License 2.0
330 stars 181 forks source link

Enhance DSL regarding ApiResponse #83

Open matanox opened 8 years ago

matanox commented 8 years ago

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....

fehguy commented 8 years ago

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.