Forum Discussion
HKosova
5 years agoSmartBear Alumni (Retired)
To add description to a $ref, you can wrap the $ref into allOf:
first: description: The first user allOf: - $ref: '#/definitions/User'
- belgi5 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
- HKosova5 years agoSmartBear Alumni (Retired)
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
Related Content
- 5 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 19 days ago