redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Responses that use oneOf generate confusing documentation and examples

Open collimarco opened this issue 3 months ago • 2 comments

This issue is present when there is a responses schema that uses oneOf.

  1. Documentation generated by redoc doesn't show the description for the different responses (shows only "object", "object").
  2. The code examples on the right, show only one of the possible responses (which is very confusing for a user reading the documentation). It would be more consistent to show a tab to select the different responses.

You can see an example here: https://github.com/pushpad/pushpad-openapi/blob/master/specification/resources/notifications/notifications_create.yml

collimarco avatar Sep 17 '25 14:09 collimarco

Could you try to use title on the schemas instead of/in addition to description

RomanHotsiy avatar Sep 18 '25 05:09 RomanHotsiy

The title is working correctly, but the description is ignored. As a workaround, if you have a discriminator field, you can set a description there for each variant.

yogevm15 avatar Sep 25 '25 13:09 yogevm15