Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 1.88 KB

README.md

File metadata and controls

78 lines (53 loc) · 1.88 KB
Speakeasy Logo

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.