mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Implemented API from code generated by OpenAPI
This commit is contained in:
@@ -10,6 +10,7 @@ Reflector is a React application that uses WebRTC to stream audio from the brows
|
||||
- [Installation](#installation)
|
||||
- [Run the Application](#run-the-application)
|
||||
- [WebRTC Integration](#webrtc-integration)
|
||||
- [OpenAPI Code Generation](#openapi-code-generation)
|
||||
- [Contribution Guidelines](#contribution-guidelines)
|
||||
|
||||
## Project Architecture
|
||||
@@ -73,6 +74,16 @@ The received data is expected to be a JSON object containing the live transcript
|
||||
|
||||
This data is then returned from the `useWebRTC` hook and can be used in your components.
|
||||
|
||||
## OpenAPI Code Generation
|
||||
|
||||
To generate the TypeScript files from the openapi.json file, make sure the python server is running, then run:
|
||||
|
||||
```
|
||||
openapi-generator-cli generate -i http://localhost:1250/openapi.json -g typescript-fetch -o app/api
|
||||
```
|
||||
|
||||
You may need to run `yarn global add @openapitools/openapi-generator-cli` first. You also need a Java runtime installed on your machine.
|
||||
|
||||
## Contribution Guidelines
|
||||
|
||||
All new contributions should be made in a separate branch. Before any code is merged into `master`, it requires a code review.
|
||||
|
||||
Reference in New Issue
Block a user