Download the PHP package alireza-h/php-openapi without Composer
On this page you can find all versions of the php package alireza-h/php-openapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alireza-h/php-openapi
More information about alireza-h/php-openapi
Files in alireza-h/php-openapi
Package php-openapi
Short Description PHP Open Api Generator
License MIT
Homepage https://github.com/alireza-h/php-openapi
Informations about the package php-openapi
PHP OpenAPI
Installation
Standalone
- Clone project
- Run
composer update
-
Check
src/Document
directory as sample and create your ownOpenApiOperationGenerator
andOpenApiDocumentGenerator
OpenApiOperationGenerator
is responsible to generate Open API Operations andOpenApiDocumentGenerator
is responsible to generate Open API json document. Each public method ofOpenApiOperationGenerator
generates one Open API Operation (Using reflection). -
Run
php -S localhost:8001
in project root directory- Open
http://loclahost:8001
in your browser for Open API json document - Open
http://loclahost:8001?swagger
in your browser for Open API Swagger UI
- Open
Dependency of existing project
-
Install package
-
Check
src/Document
directory as sample and create your ownOpenApiOperationGenerator
andOpenApiDocumentGenerator
Instead of using
OpenApiDocumentGenerator
, you can create your ownOpenApiBuilder
object and addOpenApiOperation
to builder object. - Create your own custom route to serve Open API json document and swagger UI