Swagger support

This PR adds ability to produce Swagger-compliant JSON for swagger-ui consumption.

Dependent on https://github.com/nelmio/NelmioApiDocBundle/pull/414 and https://github.com/nelmio/NelmioApiDocBundle/pull/413

This adds additional configuration options under `nelmio_api_doc`, two new `@ApiDoc` annotation properties, and two new routes that users can optionally to their application to serve the JSON files in real-time (this is naturally slow. An `api:swagger:dump` command is in the works.)

Documentation will follow.
Okay -- I will look into this ConfigCache class and implement for this in a
few days. Thanks for the suggestion.

Should I apply this as a stand-in extractor, so that the default HTML api
doc and other consuming formatters can benefit as well?
On Jul 4, 2014 12:40 AM, "William Durand" <notifications@github.com> wrote:

> In Controller/ApiDocController.php:
>
> > @@ -23,4 +26,42 @@ public function indexAction()
> >
> >          return new Response($htmlContent, 200, array('Content-Type' => 'text/html'));
> >      }
> > +
> > +    public function swaggerAction(Request $request, $resource = null)
> > +    {
> > +
> > +        $doCache = $this->container->getParameter('nelmio_api_doc.swagger.cache.enabled');
> > +
> > +        if ($doCache === true) {
>
> There is a ConfigCache class you should rather use I guess. ping @stof
> <https://github.com/stof>
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nelmio/NelmioApiDocBundle/pull/418/files#r14549864>.
>