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

fill in OpenAPI responses description #50

Merged
merged 3 commits into from
Aug 31, 2020
Merged

fill in OpenAPI responses description #50

merged 3 commits into from
Aug 31, 2020

Conversation

ahl
Copy link
Collaborator

@ahl ahl commented Aug 29, 2020

fixes #11 as described in that discussion.

This leaves as a TODO the case of the freeform Response<Body> as OpenAPI still, technically, requires a description.

We also may want to consider in the future letting consumers specify a custom description field. After further consideration, perhaps specifying the description for the success case in the #[endpoint ... ] macro isn't that bad if developers want to specify it for freeform return types or customize it for typed responses.

@ahl ahl requested a review from davepacheco August 29, 2020 06:41
Copy link
Collaborator

@davepacheco davepacheco left a comment

Choose a reason for hiding this comment

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

This looks good!

(edit: sorry, I completely missed that one of the changes was the openapi test)

dropshot/src/handler.rs Outdated Show resolved Hide resolved
dropshot/src/handler.rs Outdated Show resolved Hide resolved
@ahl
Copy link
Collaborator Author

ahl commented Aug 31, 2020

(edit: sorry, I completely missed that one of the changes was the openapi test)

Yeah, I'm just leaning on that one test to do a lot of this openapi testing, but I think it's got decent coverage.

@ahl ahl merged commit caa66d6 into master Aug 31, 2020
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.

openapi: implement response descriptions
2 participants