-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate typescript client from fastapi openapi.json
- add export.py script to backend to generate openapi.json - add generated openapi.json file - add autogenerated typescript fetch api client in src/lib/client using hey-api/openapi-ts - add hey-api/openapi-ts and hey-api/client-fetch to frontend deps - add openapi-ts to package.json scripts - add openapi-ts config file - run pnpm openapi-ts - automatically export openapi.json and generate openapi-ts client code in CI
- Loading branch information
Showing
13 changed files
with
2,141 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineConfig } from '@hey-api/openapi-ts'; | ||
|
||
export default defineConfig({ | ||
client: '@hey-api/client-fetch', | ||
input: '../mondey_backend/openapi.json', | ||
output: { | ||
path: 'src/lib/client', | ||
format: 'prettier' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.