How do i reference my models when trying to use multiple example using model/DTO?
@ApiExtraModels(DeliveryOrderListOkDTO, DeliveryOrderListOk2DTO)
@ApiOkResponse({
content: {
'application/json': {
examples: {
exampleOne: {
$ref: getSchemaPath(DeliveryOrderListOkDTO),
},
exampleTwo: {
$ref: getSchemaPath(DeliveryOrderListOk2DTO),
},
exampleThree: {
value: {
message: 'Works fine without ref',
},
},
},
},
},
})
// ...
Output:
Generated Swagger/OpenAPI 3.0 Schema:
How am i suppose to use the $ref
variable from the source code?: