We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using
"@nestjs/swagger": "^7.1.11",
I have an object with property:
@ApiProperty({ type: OfferedServiceView, description: 'any text', }) offeredServiceSnapshot: OfferedServiceView;
openapi file contains this for the property, which is wrong
"offeredServiceSnapshot":{"description":"any text","allOf":[{"$ref":"#/components/schemas/OfferedServiceView"}]}
while without description:
@ApiProperty({ type: OfferedServiceView }) offeredServiceSnapshot: OfferedServiceView;
generates
"offeredServiceSnapshot":{"$ref":"#/components/schemas/OfferedServiceView"}
The latest is correct, I wonder, why adding description breaks this?
No response
openapi should contain
10.2.5
7.1.11
The text was updated successfully, but these errors were encountered:
Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project).
Sorry, something went wrong.
@kamilmysliwiec Here's a reproduction repo: https://github.com/An-dz/nestjs-swagger-ref-reproducible
And here's the OpenAPI specification that tells that description is allowed with $ref: https://swagger.io/specification/#reference-object
What to see:
/api
/api-json
$ref
Edit: It's not only "description" that does that, "nullable" also causes the same issue.
No branches or pull requests
Is there an existing issue for this?
Current behavior
Using
I have an object with property:
openapi file contains this for the property, which is wrong
while without description:
generates
The latest is correct, I wonder, why adding description breaks this?
Minimum reproduction code
Steps to reproduce
No response
Expected behavior
openapi should contain
"offeredServiceSnapshot":{"$ref":"#/components/schemas/OfferedServiceView"}
Package version
10.2.5
NestJS version
7.1.11
Node.js version
No response
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: