This example ElysiaJS app demonstrates the Speakeasy-recommended practices for creating clear OpenAPI documents and SDKs.
This project has five example CRUD API endpoints in src/controllers/users.ts
, which can be used respectively to get all users, to get a user by id, to create a user, to delete a user, and to update a user.
You need to have Bun installed on your system to run this project.
To generate an SDK, you need to have the Speakeasy CLI installed or be comfortable using the Speakeasy dashboard UI.
Install the application on your local machine:
- Clone the repository:
git clone https://github.com/speakeasy-api/speakeasy-elysiajs-example.git
- Navigate into the directory:
cd speakeasy-elysiajs-example
- Install all dependencies for the application using Bun:
bun install
brew install speakeasy-api/homebrew-tap/speakeasy
You can use the provided script to run the application in development mode. It will watch for any changes in the source code and automatically restart the server.
bun run dev
Run the following command to generate an OpenAPI document YAML file in your root folder:
bun run generate:openapi
Run the following command to generate a Speakeasy SDK:
speakeasy quickstart
This project is licensed under the terms of the Apache 2.0 license.