Skip to content

Commit

Permalink
openapi generation tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed May 30, 2024
1 parent 883968c commit ffc0e8f
Show file tree
Hide file tree
Showing 3 changed files with 605 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

generatorCliImage=openapitools/openapi-generator-cli:v7.1.0

scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
parentDir="$(dirname "$scriptDir")"


docker run --rm -v ${scriptDir}:/local ${generatorCliImage} validate -i /local/openapi.yaml --recommend
if [ $? -ne 0 ]; then
echo "openapi.yaml is not valid"
exit 1
fi

docker run --rm -v ${parentDir}:/vcell \
${generatorCliImage} generate \
-g python \
-i /vcell/tools/openapi.yaml \
-o /vcell \
-c /vcell/tools/python-config.yaml
Loading

0 comments on commit ffc0e8f

Please sign in to comment.