Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions frameworks-elysia/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

**/*.trace
**/*.zip
**/*.tar.gz
**/*.tgz
**/*.log
package-lock.json
**/*.bun
54 changes: 54 additions & 0 deletions frameworks-elysia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Elysia Train Travel OpenAPI example

This Elysia app demonstrates Speakeasy-focused OpenAPI practices using the Train Travel domain from the Bump example API.

The sample includes resource-style endpoints for:

- `GET /stations`
- `GET /trips`
- `GET /bookings`
- `POST /bookings`
- `GET /bookings/{bookingId}`
- `DELETE /bookings/{bookingId}`
- `POST /bookings/{bookingId}/payment`

The OpenAPI output is generated from route metadata using `@elysia/openapi` and exported to YAML for SDK generation.

## Prerequisites

- Bun
- Speakeasy CLI (optional, for SDK generation)

## Install

```bash
bun install
```

## Run the server

```bash
bun run dev
```

Scalar UI is available at `http://localhost:3000/openapi`.

## Generate OpenAPI YAML

Run:

```bash
bun run generate:openapi
```

This writes `openapi.yaml` in the project root.

## Generate SDKs with Speakeasy

```bash
speakeasy quickstart
```

## License

Apache 2.0
Binary file added frameworks-elysia/bun.lockb
Binary file not shown.
Loading