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

Add RequestBodySchema and APIResponseSchema annotations #410

Merged
merged 4 commits into from Apr 7, 2020

Conversation

MikeEdgar
Copy link
Member

Fixes #363

The changes here are the latest mentioned in #363, with one difference being that the responseDescription property of @APIResponseSchema is not defaulted to an empty string. This seems appropriate given the JavaDoc of @APIResponse#description():

A short description of the response. It is a REQUIRED property unless this is only a reference to a response instance.

@EricWittmann @arthurdm - this can be discussed in the next hangout or here.

Signed-off-by: Michael Edgar michael@xlate.io

@MikeEdgar
Copy link
Member Author

We discussed in the hangout that the documentation for the response annotation will be updated to specify how implementations should derive the responseCode and responseDescription when they are omitted by an application. Both properties will be updated to be optional (i.e. defaulted to "").

Copy link
Contributor

@EricWittmann EricWittmann left a comment

Choose a reason for hiding this comment

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

LGTM

@MikeEdgar
Copy link
Member Author

Update - I'm working on TCK tests for these annotations as well. Those can be part of this PR or a separate issue - either way is fine with me.

@EricWittmann
Copy link
Contributor

I have no preference either - whatever is easier for you I would say.

Signed-off-by: Michael Edgar <michael@xlate.io>
Signed-off-by: Michael Edgar <michael@xlate.io>
Signed-off-by: Michael Edgar <michael@xlate.io>
@MikeEdgar MikeEdgar force-pushed the 363_simplified_request_response branch from 2007265 to f58206e Compare March 25, 2020 10:45
Signed-off-by: Michael Edgar <michael@xlate.io>
@MikeEdgar
Copy link
Member Author

This branch was re-based and the last two commits with the TCK tests were added.

@EricWittmann , @arthurdm - I think this is ready to go now. Please let me know if you have any feedback.

@MikeEdgar MikeEdgar requested a review from arthurdm March 25, 2020 10:56
@MikeEdgar
Copy link
Member Author

@arthurdm - have you had a chance to review? Please let me know if you notice any issues.

Copy link
Member

@arthurdm arthurdm left a comment

Choose a reason for hiding this comment

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

sorry for the delay, look great @MikeEdgar , thanks!

@arthurdm arthurdm merged commit 833ac87 into eclipse:master Apr 7, 2020
@MikeEdgar MikeEdgar deleted the 363_simplified_request_response branch April 14, 2020 10:18
Azquelt pushed a commit to Azquelt/microprofile-open-api that referenced this pull request Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streamline annotating a method's @Response when using JAX-RS Response object
3 participants