You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method of installation: web editor and swagger hub
Swagger-UI version: current editor on your site
Swagger/OpenAPI version: OpenAPI 3.0
I'm using so called "free form" objects in my posts. When I want to post with application/x-www-form-urlencoded with "free-form" object, your UI doesn't provide any form of input to insert "free-form" object. If the content-type is application/json then there is an input box to write down the object, but not with application/x-www-form-urlencoded.
This is a limitation on our part of the application/x-www-form-urlencoded form handling we have implemented - we expect properties to be defined and generate key/value pair inputs based on it.
You can use free-form in body if the type is application/json. And if your API call supports both application/json and application/x-www-form-urlencoded you can actually "hack" the Swagger interface.
You select the application/json from drop down menu and it will ofer you to create free form object. Create your name/value object.
Switch back to application/x-www-form-urlencoded. The input field for free-form object will disappear. But nevermind that and click Execute.
Swagger will actually post your free-form object you have created with application/json as application/x-www-form-urlencoded with no problem.
So, the functionality is there, you just have to enable it, so we won't have to use tricks. ;)
I'm using so called "free form" objects in my posts. When I want to post with application/x-www-form-urlencoded with "free-form" object, your UI doesn't provide any form of input to insert "free-form" object. If the content-type is application/json then there is an input box to write down the object, but not with application/x-www-form-urlencoded.
Example Swagger/OpenAPI definition:
The text was updated successfully, but these errors were encountered: