swagger is a debugging tool interfaces of java, phper imitate he wrote php-swagger
- github:https://github.com/zircote/swagger-php
- composer Installation
composer require zircote/swagger-php
I use tp5.0, open the project's home directory, find the executable file openapi, examples can also be found in the Examples, and did write on it
- Generating instructions yaml
- yaml file after I wrote the memo files before compiling docs-dev home directory, where the compiler in public / docs in
php ./vendor/zircote/bin/openapi ./docs-dev/ -o ./public/docs
- Use swagger-ui
github:https://github.com/swagger-api/swagger-ui
By introducing npm module I cloning directly down using the github
cd public git clone https://github.com/swagger-api/swagger-ui
After cloning is complete, find index.html, the configuration file path yaml
In line 42 can be configured yaml file path
Then enter your own test server configured web site can be visited, for example, my server
swagger like a postman can be as straightforward commissioning Oh, very convenient