Skip to content

Commit

Permalink
Merge pull request #252 from ZdenekM/master
Browse files Browse the repository at this point in the history
build_models: specific (older) version of openapi-generator
  • Loading branch information
ZdenekM authored Feb 29, 2024
2 parents e7b16b0 + 8f77d97 commit 1e1a846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build_models.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ tmpconf=$(mktemp ./conf.XXXXXX)
tmpoutput=$(mktemp -d ./output.XXXXXX)


echo '{\n"optionalEmitDefaultValues": true,\n"packageName": "IO.Swagger"\n}' > "$tmpconf"
echo '{"optionalEmitDefaultValues": true,"packageName": "IO.Swagger"}' > "$tmpconf"

sed 's/ - properties: {}/ - properties:\n data:\n default: ""\n type: string/g' "$1" | perl -0777 -pe's/format: uuid\n/\n/g' | perl -0777 -pe's/properties:\n allowed_values:\n type: array\n uniqueItems: true/properties:\n allowed_values:\n type: array\n uniqueItems: true\n items:\n {}/g' > "$tmpfile"


sudo docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/"$tmpfile" -g csharp -o /local/"$tmpoutput" -c /local/"$tmpconf" || exit 1
sudo docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v6.6.0 generate -i /local/"$tmpfile" -g csharp -o /local/"$tmpoutput" -c /local/"$tmpconf" || exit 1
rm "$tmpconf"
sudo chown -R `whoami` "$tmpoutput"

Expand Down

0 comments on commit 1e1a846

Please sign in to comment.