2024-01-09 15:30:36 +01:00
|
|
|
# Api client TypeScript
|
|
|
|
|
|
|
|
|
|
The backend application can automatically create a TypeScript client to be used in frontend
|
2024-07-01 19:03:52 +02:00
|
|
|
applications. It is used in the Meet front application itself.
|
2024-01-09 15:30:36 +01:00
|
|
|
|
|
|
|
|
This client is made with [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen)
|
2024-07-01 19:03:52 +02:00
|
|
|
and Meet's backend OpenAPI schema (available [here](http://localhost:8071/v1.0/swagger/) if you have the backend running).
|
2024-01-09 15:30:36 +01:00
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
|
|
We'll need the online OpenAPI schema generated by swagger. Therefore you will first need to
|
|
|
|
|
install the backend application.
|
|
|
|
|
|
|
|
|
|
## Install openApiClientJs
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$ cd src/tsclient
|
|
|
|
|
$ yarn install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Generate the client
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
yarn generate:api:client:local <output_path_for_generated_client>
|
|
|
|
|
```
|