Is there an existing issue for this?
Current behavior
Custom type is not retained as type, but rewritten as allOf: - $ref: ... breaking nullable: true spec in @ApiProperty
In @ApiProperty when using something like:
@ApiProperty({ nullable: true, type: MyCustomDto })
readonly myVar: MyCustomDto | null;
...
the rendered openapi.yaml is like:
myVar:
nullable: true
allOf:
- $ref: "#/components/schemas/MyCustomDto"
tools like Redoc.ly then start to throw errors:
Minimum reproduction code
https://nothing.com
Steps to reproduce
see above
Expected behavior
myVar:
type: object
properties:
id:
type: integer
Package version
7.3.0
NestJS version
10.3.3
Node.js version
20
In which operating systems have you tested?
Other
maybe related: #2645
maybe related: #2646
Is there an existing issue for this?
Current behavior
Custom
typeis not retained as type, but rewritten asallOf: - $ref: ...breakingnullable: truespec in@ApiPropertyIn
@ApiPropertywhen using something like:the rendered openapi.yaml is like:
tools like Redoc.ly then start to throw errors:
Minimum reproduction code
https://nothing.com
Steps to reproduce
see above
Expected behavior
Package version
7.3.0
NestJS version
10.3.3
Node.js version
20
In which operating systems have you tested?
Other
maybe related: #2645
maybe related: #2646