Forum Discussion
HKosova
Alumni
6 years agoTo add description to a $ref, you can wrap the $ref into allOf:
first:
description: The first user
allOf:
- $ref: '#/definitions/User'- belgi6 years agoNew Contributor
Thank you.
The description does work, however now the redoc does not recognize that the type of the first user is User and it is shown as type "object".
The swagger-codegen generates a Request class with no users as oppesed to the attempt in the post
- HKosova6 years ago
Alumni
It's a tooling bug then. You can submit bug reports in the GitHub repositores of those projects:
Swagger Codegen: https://github.com/swagger-api/swagger-codegen/issues
ReDoc: https://github.com/Redocly/redoc/issues