nelmio/NelmioApiDocBundle — pull request #198 by jhallbachner (2013-06-04 23:07:57+00:00)
Title: Add BodyFormat Selector and Support Json-Encoded Api Requests In Sandbox

It's common to produce APIs that accept requests in the form of a single JSON-encoded string rather than form-encoded data. (I'm currently using NelmioApiDocBundle in a project that does this via the FOSRestBundle.) This pull request adds the ability to use ApiDocBundle's sandbox to send requests in either x-www-form-urlencoded or JSON formats.

The mechanism for this feature is patterned off of the existing requestFormat feature. I added a dropdown at the top of the screen to select the type, and automatically set Content-type when it isn't explicitly overridden inside the sandbox. In addition I provided a configuration parameter to set a default method for a given API, and added documentation of that parameter to the README.