This example tsoa app demonstrates Speakeasy-recommended practices for generating clear OpenAPI specifications and SDKs.
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.
To install the application on your local machine:
- Clone the repository:
git clone https://github.com/ritza-co/speakeasy-bar-tsoa.git
- Navigate into the directory:
cd speakeasy-bar-tsoa
- Install all dependencies for the application using Yarn:
yarn install
brew install speakeasy-api/homebrew-tap/speakeasy
- Compile the TypeScript files:
yarn build
- Start the server:
yarn start
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
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
This project is licensed under the terms of the Apache 2.0 license.