redoc icon indicating copy to clipboard operation
redoc copied to clipboard

"application/x-www-form-urlencoded" in request body are not being rendered in the right panel

Open lsalazarm99 opened this issue 4 years ago • 9 comments

As the title says, application/x-www-form-urlencoded is not being rendered in the right panel.

If I set it to application/json, it renders well (as a JSON, of course).

You can check it in the live demo.

lsalazarm99 avatar Mar 21 '20 23:03 lsalazarm99

Thanks for the report and for the demo link. You can add your example manually at them moment via media type example.

What output do you expect for the example you sent?

name=Guru&status=available

RomanHotsiy avatar May 09 '20 12:05 RomanHotsiy

I need to display example in json format for easy readability. Is there any option for that ?

vaasav-kumar avatar May 18 '20 09:05 vaasav-kumar

@RomanHotsiy the media type example doesn't work either. Any other workaround? This issue has more than 1 year, any idea if this will be fixed?

d-silva avatar Jun 30 '21 17:06 d-silva

I need to display example in json format for easy readability. Is there any option for that ?

@vaasav-kumar the concern is that Redoc is used by many people and what is "easy readability" for you or your API docs may be confusing for someone else.

@d-silva The above is one of the reasons we're not working on it yet. We don't have a good idea yet that will satisfy broad audience of users.

Another reason is that we have limited resources right now and this is a feature request while we have bunch of bugs to solve 🙈 . I marked it with feature label so it gets higher in our list. Thanks for pinging me.

RomanHotsiy avatar Jul 01 '21 06:07 RomanHotsiy

I understand. Thanks for your reply @RomanHotsiy

d-silva avatar Jul 01 '21 14:07 d-silva

Are there any updates on this?

thomas-schreiter avatar Jan 28 '22 09:01 thomas-schreiter

In OpeanAPI v3 it can be done like so:

      requestBody:
        content:
          application/x-www-form-urlencoded:
            example:
              client_id: a08bfa22-e6d6-11ed-891c-2ea11c960b3f
              code_challenge: 9Y__uhKapn7GO_ElcaQpd8C3hdOyqTzAU4VXyR2iEV0

einaralex avatar Apr 30 '23 23:04 einaralex

Hi, are there any new changes on this issue?

szymonmil avatar Sep 19 '23 09:09 szymonmil

Thanks for checking in on this @szymonmil , we'll update the issue when we're working on this, or have something to share.

lornajane avatar Sep 19 '23 09:09 lornajane