AI-Engineer-Foundation / agent-protocol

Common interface for interacting with AI agents. The protocol is tech stack agnostic - you can use it with any framework for building agents.

Home Page:https://agentprotocol.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI generator

wilsonianb opened this issue · comments

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.

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 #94