Serialize Rust types to TS
This commit is contained in:
parent
eb1cc61042
commit
2cdf2ba74e
3 changed files with 16 additions and 1 deletions
|
|
@ -4,5 +4,12 @@ set -e
|
|||
|
||||
./scripts/utils/wait-for-server.sh
|
||||
|
||||
rm -rf backend/sync_server/bindings
|
||||
cd backend
|
||||
cargo test export_bindings
|
||||
cd -
|
||||
|
||||
cp -r backend/sync_server/bindings/* frontend/sync-client/src/services/types/
|
||||
|
||||
npm install -g openapi-typescript
|
||||
openapi-typescript http://localhost:3000/api.json --output frontend/sync-client/src/services/types.ts
|
||||
openapi-typescript http://localhost:3000/api.json --output frontend/sync-client/src/services/types/http-api.ts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue