X-www-form-urlencoded requests are not presented correctly


(Arie Gofer) #1

Hi,
I am trying to create a API which accepts parameters in POST - as urlencoded parameters.
The API is defined as “POST”, with consumes “x-www-form-urlencoded”.
image
I define the expected parameters as request body (as “formData”).

But in read mode - it is shown as it is a json payload:

And on the test request section - the parameters do not appear:

Am I missing anything?
Thanks !


(Taylor Barnett) #2

This might have been a small oversight when the test request feature was developed.

I’m going to open up a ticket with the engineering team and I’ll let you know what I find out.


(Arie Gofer) #3

Thanks @taylor
The problem is not only with the test request, but the way it is presented (as json request) and not as expected.
I can live with the problem with the test request, but the documentation is wrong in the way it is presented

Thanks !


(Taylor Barnett) #4

How would you like it be shown here?


(Taylor Barnett) #5

This probably won’t make it into the next sprint, but I am trying to make it easy to do in a future sprint.

The workaround I have right now is to add to the description for the operation what type it consumes, so then it is clearer to the end user.


(Arie Gofer) #6

I guess the best way is as a list of fields, rather than shown with “schema” (which feels like json) and the top level “object”.
As for the workaround - this is what we already do :slight_smile: Thanks