2023-12-26 10:51:46 -05:00
|
|
|
# Full Stack FastAPI and PostgreSQL - Frontend
|
2023-11-30 16:16:32 -05:00
|
|
|
|
2023-12-26 10:51:46 -05:00
|
|
|
## Generate Client
|
2023-11-30 16:16:32 -05:00
|
|
|
|
2023-12-26 10:51:46 -05:00
|
|
|
- Start the Docker Compose stack.
|
|
|
|
- Download the OpenAPI JSON file from `http://localhost/api/v1/openapi.json` and copy it to a new file `openapi.json` next to the `package.json` file.
|
|
|
|
- To simplify the names in the generated frontend client code, modifying the `openapi.json` file, run:
|
2023-11-30 16:16:32 -05:00
|
|
|
|
2023-12-26 10:51:46 -05:00
|
|
|
```bash
|
|
|
|
node modify-openapi-operationids.js
|
|
|
|
```
|
2023-11-30 16:16:32 -05:00
|
|
|
|
2023-12-26 10:51:46 -05:00
|
|
|
- To generate or update the frontend client, run:
|
2023-11-30 16:16:32 -05:00
|
|
|
|
2023-12-26 10:51:46 -05:00
|
|
|
```bash
|
|
|
|
npm run generate-client
|
2023-11-30 16:16:32 -05:00
|
|
|
```
|