-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate.sh
More file actions
executable file
·36 lines (33 loc) · 1.01 KB
/
Copy pathgenerate.sh
File metadata and controls
executable file
·36 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -eux -o pipefail
# Generate Neynar SDK
rm -rf ./generated/api/*
npx --yes @openapitools/openapi-generator-cli \
generate \
--git-user-id neynarxyz \
--git-repo-id rust-sdk \
-g rust \
--additional-properties=packageVersion="$SDK_VERSION" \
--config ./src/api/openapi-generator-config.json \
-i ./src/OAS/src/api/spec.yaml \
-o ./generated/api \
--inline-schema-options 'SKIP_SCHEMA_REUSE=true' \
--type-mappings='"file=Vec<u8>"'
# Generate Hubble SDK
rm -rf ./generated/hub-api/*
npx --yes @openapitools/openapi-generator-cli \
generate \
--git-user-id neynarxyz \
--git-repo-id rust-sdk \
-g rust \
--config ./src/hub-api/openapi-generator-config.json \
-i ./src/OAS/src/hub-api/spec.yaml \
-o ./generated/hub-api \
--additional-properties=packageVersion="$SDK_VERSION" \
--inline-schema-options 'SKIP_SCHEMA_REUSE=true' \
--type-mappings='"file=Vec<u8>"'
# Build the workspace
cargo fmt
cargo build
# test the workspace
cargo test