Support application/x-www-form-urlencoded input parameters
I want to describe method that accepts form-urlencoded POST parameters.
I'd like to specify them somehow, so they will be displayed inside "In" section of method description.
Might be it's possible already, but i didn't find how.
You can use form input parameters as part of request body.
AdminLukas Linhart (Admin, apiary.io) commented
this feature request is older than parameter description, so it doesn't take this into account ;)
However, describing body parameters (regardless of their content-type) is planned for upcoming parser release. If you want to track progress or provide some feedback, please take a look here: https://github.com/apiaryio/api-blueprint/issues/25
Huiming Teo commented
Hi Lukas, any updates on this feature? I wish know how to document application/x-www-form-urlencoded input parameters for a POST request. Can you show me a working example?
I'm trying to do this, but the input parameters table is not rendered.
### Create a Note [POST]
+ Request (application/x-www-form-urlencoded)
+ title (required, string) ... Foo bar
AdminZ (Admin, apiary.io) commented
Note that this suggestion might be covered by upcoming API Blueprint Format update. Please refer to http://support.apiary.io/forums/120125-general/suggestions/2970802-new-api-blueprint-format.
AdminJakub Nesetril (CEO, apiary.io) commented
I would like to ask for a brief clarification on this request...
You can accept any POST data in Apiary as of now. For x-www-form-urlencoded parameters it would mean adding appropriate HTTP content type header to the incoming headers section, and then properly encoded incoming data to the data section.
While this works, it is clearly not overly convenient.
Since you voted for this feature, I wanted to ask for some feedback on what you actually view as important addition:
- better syntax-highlight of urlencoded parameters in blueprint editor
- ability to describe the parameters in a more user-friendly way (and for apiary to produce the required sterilization automatically)
- better support in code samples (let the client library do the serialization)
Please let me know if it's any of the above or another idea that I have missed.
Thanks in advance,