@voicenter-team/real-time-events-types
v0.0.29
Published
## 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.
Keywords
Readme
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
.envfile based on.env.exampleto provide necessary environment variables.
Installation
Clone this repository:
git clone repo-url cd repoInstall dependencies:
yarn
Usage
Update the Swagger JSON file:
yarn run updateGenerate TypeScript types:
yarn run generateOr do both:
yarn run all
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 portDB_HOST: Database hostDB_HOST_NAME: Database host nameDB_POOL_USER: Database pool userDB_POOL_PASSWORD: Database pool passwordDB_POOL_NAME: Database pool nameDB_POOL_DOCS_NAME: Database pool docs nameDB_POOL_PORT: Database pool portAPP_API_SWAGGER_URL: Swagger URL for APIPORT: Port number
Notes
- Ensure that the
.envfile 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.
