eclipse / microprofile-open-api

Microprofile open api
Apache License 2.0
131 stars 81 forks source link

Allow APIResponse on resource class #524

Closed Azquelt closed 2 years ago

Azquelt commented 2 years ago

APIResponse annotations on the method override APIResponse annotations on the resource class with the same response code.

Fixes #417

Azquelt commented 2 years ago

Reading over this again, should we allow @APIResponse to be applied to an ExceptionMapper class as well as the toResponse method?

Adding it to the class seems more natural, I assume it was only applied to the method because previously the annotation only targeted methods.

MikeEdgar commented 2 years ago

Reading over this again, should we allow @APIResponse to be applied to an ExceptionMapper class as well as the toResponse method?

I think that makes sense.

Azquelt commented 2 years ago

Updated to test for APIResponse on an ExceptionMapper class.