dev-master
9999999-devA sample way to scan Swagger annotation documents
Apache License
The Requires
- php >=5.6
- zircote/swagger-php 2.0.9
by davin.bao
api documentation swagger
Wallogit.com
2017 © Pedro Peláez
A sample way to scan Swagger annotation documents
A sample way to generate Swagger documentation for your RESTful API using doctrine annotations., (*2)
composer install
vi /etc/hosts # add IP VHOST 127.0.0.1 apidoc.local
<VirtualHost *:80>
ServerName apidoc.local
DocumentRoot "/www/apidoc/public"
<Directory "/www/apidoc/public">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
# use index.php as index file
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
Add annotations to your php files., (*3)
/** * @SWG\Info(title="My First API", version="0.1") */ /** * @SWG\Get( * path="/api/resource.json", * @SWG\Response(response="200", description="An example resource") * ) */
See the Examples directory for more., (*4)
Feel free to submit Github Issues or pull requests., (*5)
A sample way to scan Swagger annotation documents
Apache License
api documentation swagger