eclipse / microprofile-open-api

Microprofile open api
Apache License 2.0
132 stars 82 forks source link

Add RequestBodySchema and APIResponseSchema annotations #410

Closed MikeEdgar closed 4 years ago

MikeEdgar commented 4 years ago

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 commented 4 years ago

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

MikeEdgar commented 4 years ago

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 commented 4 years ago

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

MikeEdgar commented 4 years ago

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 commented 4 years ago

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