Swagger-PHP is a PHP library that serves as an annotations toolkit to produce Swagger Doc it makes use of the Doctrine Common library for annotations support.
To report issues or ask questions please feel free to submit to Github Issues
- pear: http://zircote.com/pear
- composer: zircote/swagger-php
- tarball: https://github.com/zircote/swagger-php/downloads
- Clone via git: https://github.com/zircote/swagger-php.git
Documentation is available at http://zircote.com/swagger-php
To submit changes, additions or updates to the documentation or swagger-php itself please fork the project and submit a pull request. Documentation resides within the gh-pages
branch.
- Fully compatible with the full swagger documented proposal.
- Full project discovery
- Standalone CLI phar implementation
- Free
More on Swagger:
- http://swagger.io/
- https://github.com/swagger-api/swagger-spec/
- https://github.com/outeredge/SwaggerModule a ZF2 Module implementing swagger-php
Use --external option to only output APIs that contain paths starting with 'external'. Use --internal option to only output APIs that contain paths not starting with 'external'.
Example shell command
#!/bin/sh
mkdir ~/BBC/mdt-mobileapi/public/swagger-app-definition/external
cd ~/BBC/mdt-mobileapi/public/swagger-app-definition/external
php /Users/ed/PhpstormProjects/swagger-php/bin/swagger /Users/ed/BBC/mdt-mobileapi/application/MobileApi/ -o ~/BBC/mdt-mobileapi/public/swagger-app-definition/external --external
mkdir ~/BBC/mdt-mobileapi/public/swagger-app-definition/internal
cd ~/BBC/mdt-mobileapi/public/swagger-app-definition/internal
php /Users/ed/PhpstormProjects/swagger-php/bin/swagger /Users/ed/BBC/mdt-mobileapi/application/MobileApi/ -o ~/BBC/mdt-mobileapi/public/swagger-app-definition/internal --internal