Skip to content

speakeasy-api/speakeasy-tsoa-example

Repository files navigation

Speakeasy

Speakeasy

Build APIs your users love ❤️ with Speakeasy



Speakeasy tsoa OpenAPI Example

This example tsoa app demonstrates Speakeasy-recommended practices for generating clear OpenAPI specifications and SDKs.

Prerequisites

You need to have Node.js and Yarn installed on your system to run this project. If you don't have these installed, you can download them from here and here.

To generate an SDK, you'll also need the Speakeasy CLI installed, or use the Speakeasy dashboard.

Installation

To install the application on your local machine:

  1. Clone the repository:
git clone https://github.com/ritza-co/speakeasy-bar-tsoa.git
  1. Navigate into the directory:
cd speakeasy-bar-tsoa
  1. Install all dependencies for the application using Yarn:
yarn install
  1. Install Speakeasy CLI:
brew install speakeasy-api/homebrew-tap/speakeasy

Running the application

  1. Compile the TypeScript files:
yarn build
  1. Start the server:
yarn start

For development

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 and update the routes and OpenAPI definition.

yarn dev

Working with the OpenAPI specification

If you want to have a separate OpenAPI specification file in YAML format, run:

yarn spec

Additionally, you can generate both the specification file and a TypeScript SDK for your API using:

yarn spec-and-sdk

License

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

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •