-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
19 lines (15 loc) · 782 Bytes
/
Justfile
File metadata and controls
19 lines (15 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Generate Rust API client
rust-api:
openapi-generator generate -i http://localhost:8080/apidoc/openapi.json -g rust -o api_client --skip-validate-spec
echo "#![allow(warnings)]" > temp.rs && cat api_client/src/lib.rs >> temp.rs && mv temp.rs api_client/src/lib.rs
# Generate TypeScript API client
ts-api:
cd web && pnpm typegen
# Generate TypeScript types for WebSocket events
ts-types:
cd server && cargo test export_bindings
typegen: rust-api ts-api ts-types
# Generate Rust client for headscale API
headscale-api:
openapi-generator generate -i https://vpn.ctf.agin.rocks/swagger/v1/openapiv2.json -g rust -o headscale --skip-validate-spec
echo "#![allow(warnings)]" > temp.rs && cat headscale/src/lib.rs >> temp.rs && mv temp.rs headscale/src/lib.rs