Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI generator #95

Open
wilsonianb opened this issue Jan 9, 2024 · 1 comment
Open

OpenAPI generator #95

wilsonianb opened this issue Jan 9, 2024 · 1 comment

Comments

@wilsonianb
Copy link
Contributor

wilsonianb commented Jan 9, 2024

Should a single tool be used to generate all of the SDK and client libraries from the OpenAPI schema?

It looks like the python client was generated using @openapitools/openapi-generator-cli

The OpenAPI Generator is a Java project. openapi-generator-cli will download the appropriate JAR file and invoke the java executable to run the OpenAPI Generator. You must have the java binary executable available on your PATH for this to work.

I'm not crazy about needing Java. Would it be ok to instead require devs to have docker (just for client generation)?
https://www.npmjs.com/package/@openapitools/openapi-generator-cli#use-docker-instead-of-running-java-locally

There's also:

I'm also wondering if there should be a single script (in the root package.json?) to regenerate all clients and sdks based on the current OpenAPI specs.
You could then have husky and/or a GitHub Actions workflow validate that everything's up to date.

@wilsonianb
Copy link
Contributor Author

After an office hours discussion with @jzanecook, I'm planning on:

  • adding a script to generate Python and TypeScript clients using @openapitools/openapi-generator-cli (docker mode, no java)
  • adding a GitHub Actions workflow to run this script and validate that it doesn't create a diff (to confirm that OpenAPI schema changes are accompanied by updated clients)
  • adding a GitHub Actions workflow to validate the current OpenAPI schemas OpenAPI schema validation #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant