Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_models: specific (older) version of openapi-generator #252

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading