Awesome
Swagger Bake Demo Application
Submit problems or requests for additional examples as github issues.
Installation
Clone repository:
git clone git@github.com:cnizzardini/cakephp-swagger-bake-demo.git
Install via composer:
composer install
Configure the application for database access using config/.env
or config/app_local.php
, then run
migrations to build/seed your database. The default in config/app.php
will work with sqlite3.
bin/cake migrations migrate -p Sakila
bin/cake migrations seed -p Sakila
Configure your web server or run the cake web server:
bin/cake server
That's it, you're done!
Examples
Here is a list of some examples. It's best to search src/
for an exhaustive list of examples.
Feature | Example |
---|---|
SwaggerBake Events | App\Event\SwaggerBakeListener |
OpenApiDto | App\Controller\ExamplesControllers |
OpenApiForm | App\Controller\ExamplesController::formExample |
OpenApiHeader | App\Controller\ExamplesController::headerExample |
OpenApiOperation | App\Controller\ActorsController::index |
OpenApiPaginator | Most controller index() actions have this defined |
OpenApiPath | |
OpenApiPathParam | |
OpenApiQueryParam | App\Controller\ExamplesController::headerExample |
OpenApiRequestBody | |
OpenApiResponse | App\Controller\CountriesController |
OpenApiResponse associations | App\Controller\ActorsController::films |
OpenApiResponse schema | App\Controller\ExamplesControllers |
OpenApiSchema | App\Model\Entity\Rental |
OpenApiSchemaProperty | |
OpenApiSearch | FilmsController::index |
OpenApiSecurity |