Avoid request schema code validation, starter which is integrated with the agnostic open api schema + validation in order to provide the best restful design for your API services, care about your business logic validation, implementation and leave the starter to take care of the rest.
- PHP >= 8.0
- MYSQL 8
- Laravel 9
- Open API (3.0.2)
- OpenAPI PSR-7 Message (HTTP Request/Response) Validator
Added under storage/app/schema
(Live).
Routes are imported from the open api specifications to provide a more generic way for configuring routes, this also means that accessing any routes not specified in the open api specifications would return an error.
For more info check App\Providers\RouteServiceProvider::configureRoutes
Security is done based on the specification as well and handled by the App\Modules\OpenApi\Services\AuthenticationManager
make rebuild
to rebuild and start services.- Install npm for local development.
- Add your open api specifications (under
storage/app/schema
) and don't forget to define anoperationId
for your new operation. - Add the new
operationId
and the correspondingRequestHandler
to theApiHandler::MAP
(located atapp/Modules/Api/ApiHandler.php
). make bundle
to combine and validate your specs.make swagger-ui
to host your open api specs locally localhost.make test
to start running tests.
Have a look over Makefile for more options.
Feel free to create Pull Requests.