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

(Arie Gofer) #1

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”.
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

(Arie Gofer) #7

@taylor Any updates on this issue? Please note that when trying to test the API this way, the request body fields do not appear by default on the body section and it is really annoying. Thanks !

(Taylor Barnett) #8

@agofer the only update I have is that it is now higher in the bug backlog, which is good! I’ll try to get it into a future sprint, but it probably won’t make it into the next couple because of the product work that is going on.

(Arie Gofer) #9

thanks @taylor. I will wait patiently :slight_smile:

(Taylor Barnett) #10

We’re making progress! What do you think?


(Arie Gofer) #11

@taylor looks great ! Thanks for sharing

1 Like