summaryrefslogtreecommitdiffstats
path: root/rust/codegen_openapi2.sh
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-14 18:52:48 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-14 18:52:50 -0800
commit54c4b6cd67c7f8190dc7dfb4da6ad99dc2101c82 (patch)
treef121a1deebef99a639ff82bc241eb44f2d5bc8ef /rust/codegen_openapi2.sh
parent610b0a6550c758529cf6c34587f45e483a240df4 (diff)
downloadfatcat-54c4b6cd67c7f8190dc7dfb4da6ad99dc2101c82.tar.gz
fatcat-54c4b6cd67c7f8190dc7dfb4da6ad99dc2101c82.zip
fix date/datetime confusion on rust/API side
Should have dug in to this earlier; python code was getting confused. This is a breaking API change, from a practical standpoint, as both python and rust code had been hacked to work around this.
Diffstat (limited to 'rust/codegen_openapi2.sh')
-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 05e75ff0..f7d1df53 100755
--- a/rust/codegen_openapi2.sh
+++ b/rust/codegen_openapi2.sh
@@ -8,4 +8,7 @@ git checkout fatcat-api-spec/Cargo.toml
sed -i 's/Object/serde_json::Value/g' fatcat-api-spec/src/models.rs
sed -i 's/extern crate uuid;/extern crate serde_json;\nextern crate uuid;/g' fatcat-api-spec/src/models.rs
+# 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
+
cargo fmt