mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
Bump openapi-generator to 7.7.0 (#14)
* bump: openapi-generator to 7.7.0 * fix: remove empty doc comments to silence clippy * bump: remove unessecary patches fixed by the update * bump: run generate.sh
This commit is contained in:
33
generate.sh
33
generate.sh
@ -20,38 +20,11 @@ sed -i 's/^description = ".*"/description = "VRChat API Client for Rust"/' Cargo
|
||||
find src -type f -exec sed -i '/VRChat API Banner/d' {} \;
|
||||
# Remove openapi version in every file
|
||||
find src -type f -exec sed -i '/The version of the OpenAPI document/d' {} \;
|
||||
# Remove empty doc comments
|
||||
find src -type f -exec sed -i '/^\s*\/\/\/\s*$/d' {} \;
|
||||
|
||||
# Cookie storage
|
||||
sed -i 's/Client::new()/Client::builder().cookie_store(true).build().unwrap()/g' src/apis/configuration.rs
|
||||
|
||||
# https://github.com/OpenAPITools/openapi-generator/issues/14171
|
||||
# Replace Option<SortOption with Option<crate::models::SortOption in src/apis
|
||||
sed -i 's/Option<SortOption>/Option<crate::models::SortOption>/g' src/apis/*.rs
|
||||
# Replace Option<ReleaseStatus with Option<crate::models::ReleaseStatus in src/apis
|
||||
sed -i 's/Option<ReleaseStatus>/Option<crate::models::ReleaseStatus>/g' src/apis/*.rs
|
||||
# Replace Option<OrderOption with Option<crate::models::OrderOption in src/apis
|
||||
sed -i 's/Option<OrderOption>/Option<crate::models::OrderOption>/g' src/apis/*.rs
|
||||
# Replace message_type: InviteMessageType with message_type: crate::models::InviteMessageType in src/apis
|
||||
sed -i 's/message_type: InviteMessageType/message_type: crate::models::InviteMessageType/g' src/apis/*.rs
|
||||
# Replace Option<GroupSearchSort with Option<crate::models::GroupSearchSort in src/apis
|
||||
sed -i 's/Option<GroupSearchSort>/Option<crate::models::GroupSearchSort>/g' src/apis/*.rs
|
||||
|
||||
# -Missing Github Issue-
|
||||
# Append patches/InviteMessageType-Display.rs to invite_message_type.rs
|
||||
cat patches/InviteMessageType-Display.rs >> src/models/invite_message_type.rs
|
||||
# Remove the ToString section and it's included function
|
||||
# impl ToString for InviteMessageType {
|
||||
# fn to_string(&self) -> String {
|
||||
# match self {
|
||||
# Self::Message => String::from("message"),
|
||||
# Self::Response => String::from("response"),
|
||||
# Self::Request => String::from("request"),
|
||||
# Self::RequestResponse => String::from("requestResponse"),
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
|
||||
sed -z -i 's/impl ToString for InviteMessageType {\n[ a-zA-Z_\(\)&-\>{\n:=",]*}\n }\n}//g' src/models/invite_message_type.rs
|
||||
sed -i 's/features = \["json", "blocking", "multipart"\]/features = \["json", "blocking", "cookies", "multipart"\]/g' Cargo.toml
|
||||
|
||||
cargo build
|
||||
|
Reference in New Issue
Block a user