Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-api/speakeasy-zod-openapi
Speakeasy Zod OpenAPI Example
https://github.com/speakeasy-api/speakeasy-zod-openapi
openapi sdk speakeasyapi zod
Last synced: about 1 month ago
JSON representation
Speakeasy Zod OpenAPI Example
- Host: GitHub
- URL: https://github.com/speakeasy-api/speakeasy-zod-openapi
- Owner: speakeasy-api
- License: mit
- Created: 2023-09-06T19:43:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-06T20:07:28.000Z (over 1 year ago)
- Last Synced: 2024-11-30T19:44:57.314Z (about 1 month ago)
- Topics: openapi, sdk, speakeasyapi, zod
- Language: Python
- Homepage: https://speakeasyapi.dev/docs/api-frameworks/zod/
- Size: 43.9 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://speakeasyapi.dev/docs/api-frameworks/zod/).
## Requirements
- Node v20.4.0
- Speakeasy CLI## Install Node modules
To install and run this example, you'll need to clone the repository and install the required node modules:
1. Clone this repo:
```bash
git clone [email protected]:ritza-co/speakeasy-zod-openapi.git
```
2. Install Node modules. Run the following in the terminal:
```bash
npm install
```## Install Speakeasy CLI
To save OpenAPI output to a file and regenerate the SDK with Speakeasy, first install Speakeasy by following the [Speakeasy Getting Started](https://speakeasyapi.dev/docs/product-reference/speakeasy-cli/getting-started/) guide.
On macOS, you can install Speakeasy using Homebrew.
In your terminal, run:
```bash
brew install speakeasy-api/homebrew-tap/speakeasy
```## Regenerate the `openapi.yaml` and the client SDK
In the project's directory, run:
```bash
npm run gen-openapi && npm run gen-sdk
```