How to document POST settings using Apiary?

I wrote a small web service that was designed to hang, so it uses application/x-www-form-urlencoded parameters in POST requests, for example:

 curl http://api.example.com/ -d param1=foo -d param2=bar 

I would like to document this service using Apiary , but I was not able to figure out a way to provide structured documentation for these parameters. I can provide an example request like this ...

 + Request (application/x-www-form-urlencoded) param1=foo&param2=bar 

... but this does not allow me to provide documentation on individual parameters (and cannot be verified in, since it cannot provide input fields for various parameters).

I read the api blue specification somewhat and I could not find a good solution. Is there anyway to provide structured documentation for these parameters?

+5
source share
1 answer

You can use Attributes to describe this type.

 FORMAT: 1A HOST: http://api.example.com/ # Test attributes 1 ## Create post [/] ### Create a Post [POST] + Attributes + param1: foo (string) - Foo param + param2: bar (string) - Bar param + Request (application/x-www-form-urlencoded) + Response 201 
+2
source

All Articles