Create pipeline to automatically sync swagger client code
Since we are using swagger to define Estuary's API ( ie. https://github.com/application-research/estuary/blob/master/docs/swagger.yaml ), we should be using a pipeline to keep the multiple SDKs up to date automatically. Current swagger-based SDKs are:
- https://github.com/application-research/estuary-java-sdk
- https://github.com/application-research/estuary-csharp-sdk
- https://github.com/application-research/estuary-js-sdk
- https://github.com/application-research/estuary-rust-sdk
Each can be generated with the openapi-generator docker image as follows (see also the openapi-generator docker README):
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-i https://raw.githubusercontent.com/application-research/estuary/master/docs/swagger.yaml \
-g rust \
-o /local/out/estuary-rust-sdk
Ideally, a pipeline step could be added to the existing release workflow to perform these updates.
Risk: figure out if github actions allow for code checkins/updates to other repos
Postscript:
It would also be ideal to have the main pipeline sync the swagger docs via make generate-swagger before performing the code generation.
PR for docs generation -- https://github.com/application-research/estuary/pull/269/files
We should be able to use https://github.com/marketplace/actions/push-to-a-repo for the SDKs
@anjor nicely done sir! Do you think we should to the SDK sync-ing on each merge/checkin to master or each release cut?
I think we should do it on release cuts. That way there is a sense of confidence/stability in the sdk.
@snissn is this functionality already completed?
Lmao yup!! I was confused just now reading this 😂
Yeah I think we can close this.