From 7392e457fae4d9f7b3dfa79dccfdaf23d6f9d1a5 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 11 Aug 2022 19:39:17 -0700 Subject: codegen: update script to use generator v6.0.1 --- codegen_openapi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen_openapi.sh b/codegen_openapi.sh index 94a5457..6cda986 100755 --- a/codegen_openapi.sh +++ b/codegen_openapi.sh @@ -8,7 +8,7 @@ OUTPUT=`pwd`/fatcat-openapi mkdir -p $OUTPUT cat ./fatcat-openapi3.yml | grep -v "TAGLINE$" | perl -0777 -pe "s/<\!-- STARTLONGDESCRIPTION -->.*<\!-- ENDLONGDESCRIPTION -->//s" > $OUTPUT/api.yaml -export OPENAPI_GENERATOR_VERSION=5.0.0 +export OPENAPI_GENERATOR_VERSION=6.0.1 ./openapi-generator-cli.sh \ generate \ --generator-name rust-server \ @@ -27,7 +27,7 @@ echo "Patching..." # Hack to fix "release_date" (and "withdrawn_date") as Date, not DateTime sed -i 's/_date: Option>/_date: Option/g' src/models.rs sed -i 's/_date: Vec>/_date: Vec/g' src/models.rs -perl -0777 -pi -e 's/_date\.push\(\n\s+chrono::DateTime::::from_str/_date\.push\(chrono::NaiveDate::from_str/gs' src/models.rs +perl -0777 -pi -e 's/_date\.push\(\n\s+ as std::str/_date\.push\(