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

feat(decorator): @ApiResponse annotation, support multiple response body examples #1455

Conversation

slowquery
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

I couldn't find the CHANGELOG.md file
If you guide me, I will edit the document.

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

I would like to document and expose multiple response situations for the same http response status code.
It is supported in openapi 3.0.0, and the 'examples' key in the response content has been modified to be usable.

Issue Number: N/A

What is the new behavior?

Support for optional examples key for @ApiResponse annotation
- support to show multiple response body examples in one response code.

Does this PR introduce a breaking change?

[x] Yes (i think yes.)
[ ] No

Other information

I added one simple test case.

@slowquery slowquery changed the title @ApiResponse annotation, support multiple response body examples feat: @ApiResponse annotation, support multiple response body examples Jul 16, 2021
@slowquery slowquery changed the title feat: @ApiResponse annotation, support multiple response body examples feat(decorator): @ApiResponse annotation, support multiple response body examples Jul 16, 2021
@slowquery slowquery force-pushed the feature/multiple-response-example-support branch 3 times, most recently from 4e66cd1 to b9167ee Compare July 16, 2021 09:59
@slowquery
Copy link
Contributor Author

I am modifying the e2e test.

@slowquery slowquery force-pushed the feature/multiple-response-example-support branch from b9167ee to 6310278 Compare July 17, 2021 10:15
@slowquery
Copy link
Contributor Author

I modified the test to work normally.

@slowquery
Copy link
Contributor Author

Is there any problem in applying the 'examples' support I have suggested?
I want to get feedback.

@slowquery slowquery force-pushed the feature/multiple-response-example-support branch from 6310278 to 6e3e22a Compare March 8, 2022 15:20
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.

2 participants