summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcodegen_openapi.sh4
1 files 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<chrono::DateTime<chrono::Utc>>/_date: Option<chrono::NaiveDate>/g' src/models.rs
sed -i 's/_date: Vec<chrono::DateTime<chrono::Utc>>/_date: Vec<chrono::NaiveDate>/g' src/models.rs
-perl -0777 -pi -e 's/_date\.push\(\n\s+chrono::DateTime::<chrono::Utc>::from_str/_date\.push\(chrono::NaiveDate::from_str/gs' src/models.rs
+perl -0777 -pi -e 's/_date\.push\(\n\s+<chrono::DateTime<chrono::Utc> as std::str/_date\.push\(<chrono::NaiveDate as std::str/gs' src/models.rs
# unnecessary duplicate copies of API spec
rm api.yaml