Goal
Automatically generate classes from API spec to maintain the SDK.
Use openapi-generator? https://github.com/OpenAPITools/openapi-generator
DTO References
https://github.com/PHPCreation/phpr_erp/issues/3175
Structure
(subject to change)
This is the structure for now:
The goal is to generate all Bundles/Resources/Requests and Bundles/Resources/Responses classes from API spec.
*Only generate for resources that implement CRUD
Example
You can use Note as example, I will complete the classes to display what we need.
Every requests extends AbstractRequest and every response extends AbstractResponse.
Must all be final classes, so they cannot be extended.
Goal
Automatically generate classes from API spec to maintain the SDK.
Use
openapi-generator? https://github.com/OpenAPITools/openapi-generatorDTO References
https://github.com/PHPCreation/phpr_erp/issues/3175
Structure
(subject to change)
This is the structure for now:
The goal is to generate all Bundles/Resources/Requests and Bundles/Resources/Responses classes from API spec.
*Only generate for resources that implement CRUD
Example
You can use
Noteas example, I will complete the classes to display what we need.Every requests extends
AbstractRequestand every response extendsAbstractResponse.Must all be final classes, so they cannot be extended.