-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Introduce @requestBody.file and @oas.response.file decorators #4882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly look good 👍
...penapi-v3/src/__tests__/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts
Show resolved
Hide resolved
faf0c04
to
b94a29b
Compare
@@ -357,6 +357,25 @@ class MyController { | |||
} | |||
``` | |||
|
|||
#### @requestBody.file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### Using @requestBody.file
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other titles don't have Using
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a tiny typo to fix. Cool stuff!
...penapi-v3/src/__tests__/unit/decorators/request-body/request-body-shortcut.decorator.unit.ts
Outdated
Show resolved
Hide resolved
b94a29b
to
a6088a6
Compare
This PR introduces two sugar openapi decorators to further simplify configuration of file upload/download.
@requestBody.file
- configure the request body for file upload@oas.response.file
- configure the response for file downloadThe file upload/download example is now simplified with these decorators.
A new page is added under
Usage Scenarios
to cover file upload/download.Fixes #1873
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈