qbit
qbit copied to clipboard
JSend/Swagger/Error handling. Add ability to define error response codes in annotations and deliver via swagger
Add ability to define error response codes in annotations and deliver via swagger.
The ability should work with JSend support.
@ResponseError(code = 404)
@ResponseErrors ({
@ResponseError(code = 404),
@ResponseError(code = 505)
})
@ResponseFail(code = 404, data=Foo.class)
@ResponseFails ({
@ResponseFail(code = 404, data=Foo.class),
@ResponseFail(code = 505, data=Bar.class)
})
These become JSend validation fails.
Fail: https://labs.omniti.com/labs/jsend
Exceptions always become JSend error and the message of the exception is the error.
Yes