Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 2.65 KB

README.md

File metadata and controls

59 lines (40 loc) · 2.65 KB

KleijnWeb\SwaggerBundle

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version

Invert your workflow (contract first) using Swagger (Open API) specs and set up a Symfony REST app with minimal config.

Aimed to be lightweight, this bundle does not depend on FOSRestBundle or Twig.

Contract First

SwaggerBundle is built around the idea of "contract first". Other "Swagger Bundles" see an OpenAPI definition as documentation, that you generate using config and annotations.

We say your OpenAPI definition is your config, and strive towards 'minimal additional config'. At the core, SwaggerBundle does three things:

  1. Configure Symfony Routing
  2. Validate input
  3. Coerce/transform in- and output

Usage

  1. Create a Swagger file, for example using http://editor.swagger.io/.
  2. Install and configure this bundle
  3. Create one or more controllers (as services), doing the actual work, whatever that may be.

Documentation Topics

FAQ

  • Will SwaggerBundle do x?

If x is any of these, the answer will probably stay 'no':

  • Handle Form posts.
  • Generate API documentation.
  • Mix well with GUI bundles. The bundle is biased towards lightweight API-only apps.
  • Support XML.

Notes

For a pretty complete example, see swagger-bundle-example. A minimal example is also available.

This bundle is currently actively maintained. Go to the release page to find details about the latest release.

License

KleijnWeb\SwaggerBundle is made available under the terms of the LGPL, version 3.0.