This example Zod schema demonstrates Speakeasy-recommended practices for generating clear OpenAPI specifications optimised for creating production ready client libraries. For the associated tutorial please see our docsite.
- Node v20.4.0
- Speakeasy CLI
To install and run this example, you'll need to clone the repository and install the required node modules:
- Clone this repo:
git clone [email protected]:ritza-co/speakeasy-zod-openapi.git
- Install Node modules. Run the following in the terminal:
npm install
To save OpenAPI output to a file and regenerate the SDK with Speakeasy, first install Speakeasy by following the Speakeasy Getting Started guide.
On macOS, you can install Speakeasy using Homebrew.
In your terminal, run:
brew install speakeasy-api/homebrew-tap/speakeasy
In the project's directory, run:
npm run gen-openapi && npm run gen-sdk