Voicenter real time events types generation
Description
This project automates the generation of TypeScript types and enums using openapi-typescript-codegen from a Swagger JSON file (data/Swagger.json). All generated types will be placed in the dist folder.
Prerequisites
- Node.js installed
- Create a
.env file based on .env.example to provide necessary environment variables.
Installation
Usage
Scripts
update: Updates the Swagger JSON file from db.
generate: Generates TypeScript types into dist folder.
all: Updates the Swagger JSON file and generates TypeScript types.
Environment Variables
DB_PORT: Database port
DB_HOST: Database host
DB_HOST_NAME: Database host name
DB_POOL_USER: Database pool user
DB_POOL_PASSWORD: Database pool password
DB_POOL_NAME: Database pool name
DB_POOL_DOCS_NAME: Database pool docs name
DB_POOL_PORT: Database pool port
APP_API_SWAGGER_URL: Swagger URL for API
PORT: Port number
Notes
- Ensure that the
.env file is properly configured with the required environment variables.
- Modify the Swagger JSON file (
Swagger.json) as per your API specifications.
License
This project is licensed under the MIT License - see the LICENSE file for details.