Skip to content

Commit d4f4fd3

Browse files
committed
Fix default features being wrong
Signed-off-by: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com>
1 parent d2ec556 commit d4f4fd3

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ reqwest = { version = "^0.13", default-features = false, features = ["json", "mu
1919
reqwest-middleware = { version = "^0.5", features = ["json", "multipart", "query", "form"] }
2020

2121
[features]
22-
default = ["reqwest/cookies"]
22+
default = ["native-tls"]
2323
native-tls = ["reqwest/native-tls"]
2424
rustls = ["reqwest/rustls"]
2525

2626
[dev-dependencies]
27-
tokio = { version = '1', features = ['macros', 'rt-multi-thread'] }
28-
reqwest = { version = '^0.13', features = ['native-tls']}
27+
tokio = { version = '1', features = ['macros', 'rt-multi-thread'] }

generate.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ rm src/apis src/models docs -rf
1313
./node_modules/\@openapitools/openapi-generator-cli/main.js generate \
1414
-g rust \
1515
-t ./templates \
16-
'--additional-properties=packageName=vrchatapi,supportAsync=true,avoidBoxedModels=true,library=reqwest,reqwestDefaultFeatures=reqwest/cookies,supportMiddleware=true,repositoryUrl="https://github.com/vrchatapi/vrchatapi-rust",description="VRChat API Client for Rust",infoEmail="vrchatapi.lpv0t@aries.fyi"' \
16+
'--additional-properties=packageName=vrchatapi,supportAsync=true,avoidBoxedModels=true,library=reqwest,supportMiddleware=true,repositoryUrl="https://github.com/vrchatapi/vrchatapi-rust",description="VRChat API Client for Rust",infoEmail="vrchatapi.lpv0t@aries.fyi"' \
1717
--git-user-id=vrchatapi \
1818
--git-repo-id=vrchatapi-rust \
1919
-o . \
@@ -27,10 +27,9 @@ sed -i 's/^description = ".*"/description = "VRChat API Client for Rust"/' Cargo
2727
# Remove empty doc comments
2828
find src -type f -exec sed -i '/^\s*\/\/\/\s*$/d' {} \;
2929

30-
#Fix example
31-
# tokio as an async runtime
32-
# reqwest to enable some tls handling in reqwest via feature unification (since we can't enable features of our own library for examples?)
33-
printf "\n[dev-dependencies]\ntokio = { version = '1', features = ['macros', 'rt-multi-thread'] }\nreqwest = { version = '^0.13', features = ['native-tls']}" >> Cargo.toml
30+
# Fix example
31+
# - tokio is needed as an async runtime
32+
printf "\n[dev-dependencies]\ntokio = { version = '1', features = ['macros', 'rt-multi-thread'] }" >> Cargo.toml
3433

3534
find src/ -type f -name "*.rs" -exec sed -i 's/models::models/models/g' {} +
3635
find src/ -type f -name "*.rs" -exec sed -i -E "s/(::)?std::path::PathBuf/crate::patches::better_file_upload::File<'_>/g" {} +

0 commit comments

Comments
 (0)