From 495a1367510be66a9409d7b56a4b632a64aeefef Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 25 May 2018 14:01:10 -0700 Subject: Object => serde_json::Value automation --- rust/codegen_openapi2.sh | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3