Skip to content

Commit 6a5462b

Browse files
committed
feat(ws): automate generation of types and HTTP client layer from Swagger definitions
Signed-off-by: Guilherme Caponetto <[email protected]>
1 parent d71a3f5 commit 6a5462b

File tree

89 files changed

+2276
-1575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2276
-1575
lines changed

workspaces/frontend/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,21 @@ Automatically fix linting issues:
7777
```bash
7878
npm run test:fix
7979
```
80+
81+
### API Types & Client Generation
82+
83+
The TypeScript types and the HTTP client layer for interacting with the backend APIs are automatically generated from the backend's `swagger.json` file. This ensures the frontend remains aligned with the backend API contract at all times.
84+
85+
#### Generated Code Location
86+
87+
All generated files live in the `src/generated` directory.
88+
89+
⚠️ Do not manually edit any files in this folder.
90+
91+
#### Updating the Generated Code
92+
93+
To update the generated code, run the following command:
94+
95+
```bash
96+
npm run generate:api
97+
```

0 commit comments

Comments
 (0)