-
Notifications
You must be signed in to change notification settings - Fork 469
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
Allow partial schema override for ApiResponses #1723
Labels
Comments
Thanks for your suggestion! This has been discussed in the past and we decided to not implement it in the foreseeable future. If you think your request could live outside Nest's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
When using the
@ApiResponse
decorators, we need to use thetype
and override some schema properties: e.g. theexample
.This is currently not possible.
Describe the solution you'd like
The
@ApiResponse
decorators, should "merge" an explicit schema to the schema generated from thetype
.Stackblitz example
In the following decorator, the schema example is ignored and instead the default example (generated from the DTO properties is used):
Teachability, documentation, adoption, migration strategy
I think toRefObject could be changed to not override the whole schema, but only
$ref
, e.g.What is the motivation / use case for changing the behavior?
The motivation is to be able to mix type and explicit schema
The text was updated successfully, but these errors were encountered: