Skip to content

speakeasy-api/elysia-openapi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speakeasy Logo

Speakeasy ElysiaJS OpenAPI example

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.

Prerequisites

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.

Installation

Install the application on your local machine:

  1. Clone the repository:
git clone https://github.com/speakeasy-api/speakeasy-elysiajs-example.git
  1. Navigate into the directory:
cd speakeasy-elysiajs-example
  1. Install all dependencies for the application using Bun:
bun install
  1. Install the Speakeasy CLI:
brew install speakeasy-api/homebrew-tap/speakeasy

Running the application

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

Generating an OpenAPI document

Run the following command to generate an OpenAPI document YAML file in your root folder:

bun run generate:openapi

Generating an SDK with Speakeasy

Run the following command to generate a Speakeasy SDK:

speakeasy quickstart

License

This project is licensed under the terms of the Apache 2.0 license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages