aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-25 14:01:10 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-25 14:01:10 -0700
commit495a1367510be66a9409d7b56a4b632a64aeefef (patch)
tree41d6cff93374245ca78396b71e198704fe70e001 /rust
parentaf61dbc1ca2c4babbe96d1b924f799d8a5859255 (diff)
downloadfatcat-495a1367510be66a9409d7b56a4b632a64aeefef.tar.gz
fatcat-495a1367510be66a9409d7b56a4b632a64aeefef.zip
Object => serde_json::Value automation
Diffstat (limited to 'rust')
-rwxr-xr-xrust/codegen_openapi2.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/codegen_openapi2.sh b/rust/codegen_openapi2.sh
index e003ff39..a6826148 100755
--- a/rust/codegen_openapi2.sh
+++ b/rust/codegen_openapi2.sh
@@ -3,4 +3,9 @@
cargo swagger fatcat-openapi2.yml fatcat-api --docker-tag=v2.3.1
sudo chown `whoami`:`whoami` -R fatcat-api
git checkout fatcat-api/Cargo.toml
+
+# Hack to handle "extra" JSON fields
+sed -i 's/Object/serde_json::Value/g' fatcat-api/src/models.rs
+sed -i 's/extern crate uuid;/extern crate serde_json;\nextern crate uuid;/g' fatcat-api/src/models.rs
+
cargo fmt