MatthewLacerda2 / FixFlow

A platform for business to schedule maintenance and visits on-site
Apache License 2.0
0 stars 0 forks source link

Generate Client SDK using Open Api #21

Closed MatthewLacerda2 closed 6 months ago

MatthewLacerda2 commented 7 months ago

Using OpenAPI Generator to create Client SDK

First, we generate the swagger.json. At the 'Server' folder, run:

The swagger file is the one you see at SwaggerUI, and must be generated AFTER the build, or it won't pick-up on any changes

Now we must generate the Client SDK code, specifically from within the 'src' folder, or it won't be spottable there

openapi -i ..\..\FixFlow.Server\swagger.json -o FlowApi -c axios

That will generate:

NOTE: The GitHub Action isn't running the generation!. Thus, theres a chance the developer might make Pull Requests with changes to the Models/Endpoints in the BackEnd without running the OpenAPI Generation files This has definelly to be addressed