Download the PHP package sonrac/swagger-php-openapi without Composer
On this page you can find all versions of the php package sonrac/swagger-php-openapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sonrac/swagger-php-openapi
More information about sonrac/swagger-php-openapi
Files in sonrac/swagger-php-openapi
Package swagger-php-openapi
Short Description Swagger-PHP - Generate interactive documentation for your RESTful API using phpdoc annotations
License Apache-2.0
Homepage https://github.com/zircote/swagger-php/
Informations about the package swagger-php-openapi
swagger-php
Generate interactive OpenAPI documentation for your RESTful API using doctrine annotations.
Features
- Compatible with the OpenAPI 3.0 specification.
- Exceptional error reporting (with hints, context)
- Extracts information from code & existing phpdoc annotations.
- Command-line interface available.
Installation (with Composer)
For cli usage from anywhere install swagger-php globally and make sure to place the ~/.composer/vendor/bin
directory in your PATH so the swagger
executable can be located by your system.
Usage
Add annotations to your php files.
See the Examples directory for more examples.
Usage from php
Generate always-up-to-date documentation.
Usage from the Command Line Interface
Generate the swagger documentation to a static json file.
Usage from the Deserializer
Generate the OpenApi annotation object from a json string, which makes it easier to manipulate objects programmatically.
More on OpenAPI
- https://www.openapis.org
- https://github.com/swagger-api/swagger-spec/
- http://bfanger.github.io/swagger-explained/
- Related projects
- https://www.marcoraddatz.com/en/2015/07/21/integrate-swagger-into-laravel/
Contributing
Feel free to submit Github Issues or pull requests.
The documentation website resides within the gh-pages
branch.
Make sure pull requests pass PHPUnit and PHP_CodeSniffer (PSR-2) tests.
Running tests can be done with this command in the root of the project:
To run the phpcs tests on your local machine execute:
To run both unittests and linting execute: