-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
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
Render object descriptions #720
Comments
I am curious as to what your actual schema looks like. I don't really have any help/solution for you here, but I can't seem to get names to appear in the oneOf selectors, they all simply say object. How did you get it to say ErrorAB and ErrorC etc.? |
It's MyType:
title: foo
oneOf:
... |
@cmeeren thanks, but paths:
/method:
post:
description: My default description
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/RequestOne'
- $ref: '#/components/schemas/RequestTwo'
components:
schemas:
RequestOne:
title: My first request
description: My optional description for the first method
RequestSecond:
title: My second request
description: My optional description for the second method |
I think we're talking about different things here. This issue is about rendering object descriptions in the first place. It has nothing to do with |
Or maybe this could be something toggable via the options. But either way I agree it would be very useful to be able to have this. |
Consider the following response rendering (this is not related to the
oneOf
selectors, but they show that there are previously defined schema objects at play here):In my definition, all the objects have a
description
. However, the description never seems to be rendered anywhere.I suggest rendering the object's
description
wherever relevant, e.g. just above the property list shown in the screenshot.The text was updated successfully, but these errors were encountered: