Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow APIResponse on resource class #524

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

Azquelt
Copy link
Member

@Azquelt Azquelt commented Apr 11, 2022

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

Fixes #417

APIResponse annotations on the method override APIResponse annotations
on the resource class with the same response code.
@Azquelt
Copy link
Member Author

Azquelt commented Apr 11, 2022

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
Copy link
Member

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
Copy link
Member Author

Azquelt commented Apr 19, 2022

Updated to test for APIResponse on an ExceptionMapper class.

Allow the APIResponse annotation to be used on an exception mapper class
as well as the toResponse method.
@Azquelt Azquelt force-pushed the api-response-resource-class branch from 99427ea to fc5ddf5 Compare April 19, 2022 15:04
Copy link
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

@Azquelt Azquelt merged commit 03f5170 into eclipse:master Apr 25, 2022
@Azquelt Azquelt deleted the api-response-resource-class branch April 25, 2022 10:34
@Azquelt Azquelt removed this from the MP OpenAPI 3.1 milestone Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APIResponse and APIResponses should target TYPE as well
2 participants