-
Notifications
You must be signed in to change notification settings - Fork 477
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
ApiProperty decorator required property #1682
Comments
+1, gives error: |
looks like this 'raw' definition wasn't designed to follow the OpenAPI spec(?) You can see here:
the real raw definition (I guess), is called But then, the one used by swagger/lib/interfaces/schema-object-metadata.interface.ts Lines 4 to 5 in 9879ffa
|
+1 |
6 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
Is there an existing issue for this?
Current behavior
When using
@ApiProperty
decorator should be able to provide raw definition as documented here: https://docs.nestjs.com/openapi/types-and-parameters#raw-definitions.However if try to provide raw definition like this:
It's doesn't accept
required
property as an array which I'm assuming it should if it were following the structure documented here: https://swagger.io/docs/specification/data-models/data-types/#requiredMinimum reproduction code
https://github.com/antspk/swagger-bug
Steps to reproduce
npm i
src/app.error.ts
line 8Expected behavior
It should allow providing
required
property as a string array which would map to the properties object.Package version
5.1.5
NestJS version
8.2.2
Node.js version
16.13.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: