Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-api/speakeasy-tsoa-example
An Example Repo showing OpenAPI generation from TsoA
https://github.com/speakeasy-api/speakeasy-tsoa-example
openapi sdk tsoa
Last synced: 22 days ago
JSON representation
An Example Repo showing OpenAPI generation from TsoA
- Host: GitHub
- URL: https://github.com/speakeasy-api/speakeasy-tsoa-example
- Owner: speakeasy-api
- License: apache-2.0
- Created: 2023-09-08T10:32:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-14T11:41:57.000Z (over 1 year ago)
- Last Synced: 2024-11-30T19:44:56.123Z (22 days ago)
- Topics: openapi, sdk, tsoa
- Language: TypeScript
- Homepage: https://speakeasyapi.dev/docs/api-frameworks/tsoa/
- Size: 155 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://nodejs.org/) and [here](https://yarnpkg.com/).
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:
```bash
git clone https://github.com/ritza-co/speakeasy-bar-tsoa.git
```2. Navigate into the directory:
```bash
cd speakeasy-bar-tsoa
```3. Install all dependencies for the application using Yarn:
```bash
yarn install
```4. [Install Speakeasy CLI](https://github.com/speakeasy-api/speakeasy#installation):
```bash
brew install speakeasy-api/homebrew-tap/speakeasy
```## Running the application
1. Compile the TypeScript files:
```bash
yarn build
```2. Start the server:
```bash
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.
```bash
yarn dev
```### Working with the OpenAPI specification
If you want to have a separate OpenAPI specification file in YAML format, run:
```bash
yarn spec
```Additionally, you can generate both the specification file and a TypeScript SDK for your API using:
```bash
yarn spec-and-sdk
```## License
This project is licensed under the terms of the Apache 2.0 license.