Skip to content

Makes your Swagger definition into a Symfony routing and validation spec

License

Notifications You must be signed in to change notification settings

svbeusekom/swagger-bundle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Makes your Swagger definition into a Symfony routing and validation spec

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%