mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
According to the Guidelines for Contributing (https://github.com/OpenAPITools/openapi-generator/blob/master/CONTRIBUTING.md) generated PHP code should conform to PSR-12 (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md). There are some minor violations regarding the following rule > There MUST NOT be trailing whitespace at the end of lines. This change removes trailing spaces in generated code.
Requirements
PHP 8.1 and later
Installation & Usage
- Set up flight as usual - see Flight documentation
- Generate using the OpenAPI generator
- Subclass some/all generated
Abstract*Api
and overwrite the methods you'd like handled. When implementing the*Stream
methods, make sure to stream the response and not implement the non-stream method. - Register routes for your subclassed apis:
RegisterRoutes::registerRoutes(new MyApiHandler());