aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
Diffstat (limited to 'rust')
-rwxr-xr-xrust/codegen_openapi2.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/codegen_openapi2.sh b/rust/codegen_openapi2.sh
index a3950c58..a26d3db6 100755
--- a/rust/codegen_openapi2.sh
+++ b/rust/codegen_openapi2.sh
@@ -11,6 +11,9 @@ sed -i 's/extern crate uuid;/extern crate serde_json;\nextern crate uuid;/g' fat
# Hack to fix "release_date" as Date, not DateTime
sed -i 's/release_date: Option<chrono::DateTime<chrono::Utc>>/release_date: Option<chrono::NaiveDate>/g' fatcat-api-spec/src/models.rs
+# Hack to optionally log unknown request fields (not actually needed)
+#sed -i 's/\(response.headers.set(Warning(format!("Ignoring unknown fields in body: {:?}", unused_elements)));\)/\1 warn!("unknown fields in request body: {:?}", unused_elements);/g' fatcat-api-spec/src/server.rs
+
# Hack to require that optional params parse correctly (boolean, integer, datetime)
# If we reformat, this this should basically go from, eg:
# .and_then(|x| x.parse::<i64>()