- npm
- nvm
- GNU Make
Here is a quick overview of what happen when calling make gen:
- cleanup existing files
- download Outscale API description (OpenAPI format) (in /osc-api)
- call openapi-generator in order to generate typescript-based SDK (in /src)
- call typescipt compiler to build .js and .d.ts declaration files (in /dist)
SDK itself is generated from Outscale's OpenAPI description using OpenAPI Genetator.
Other contributions like examples and tests are welcome!
This SDK follows semantic versioning from the SDK perspective (not API). Some events may trigger a major (breaking) version of the SDK:
- OpenAPI generator introduce a new major version
- Outscale introduce a new major version of its API
When OpenAPI generator introduce a breaking change, SDK can be generated in several versions (see corresponding branches)
- have some tools ready: GNU make, git, docker
- edit
api_versionfile and to the latest Outscale API version - edit
sdk_versionfile and change it according to semantic versioning - launch sdk generation by running
make gen - new sdk is now generated
Under the hood:
- we get official Outscale yaml
- run openapi-generator through docker to build osc folder
Content in src folder is generated at each release.
If you plan to make some change here, consider making a pull request in openapi-generator project.
Otherwise:
- your merge request must be rebased on the corresponding major version branch.
- be sure that tests still pass by running
make test
- fetch outscale and be sure to be on main branch
- update
api_versionto the last Outscale API version - update
sdk_versionfollowing semantic versioning logic. make gento re-build the sdkmake testand fix any issue- commit changes
- tag version
- push to corresponding branch
- create github release
Note that CI should automatically detect new release on osc-api, update the SDK and push a new version.