aboutsummaryrefslogtreecommitdiffstats
path: root/python-packages/sra_client/generate.sh
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:58:34 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:58:34 +0800
commit8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023 (patch)
tree608b52c60fb24777274de78174e69b88a75362e0 /python-packages/sra_client/generate.sh
parent67422db4bd0b194296a1a584af7ead089e281715 (diff)
parent6d45beccad44e86ddd692d0cf54c09c29c5d9daf (diff)
downloaddexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.gz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.bz2
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.lz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.xz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.zst
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.zip
Merge branch 'development' into feature/instant/usd-eth-toggle
Diffstat (limited to 'python-packages/sra_client/generate.sh')
-rwxr-xr-xpython-packages/sra_client/generate.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/python-packages/sra_client/generate.sh b/python-packages/sra_client/generate.sh
new file mode 100755
index 000000000..91967dee3
--- /dev/null
+++ b/python-packages/sra_client/generate.sh
@@ -0,0 +1,26 @@
+# This file provided not so much to be run but rather more for posterity, as a
+# record of how this generated code was produced.
+
+GENERATOR_JAR=http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar
+GENERATOR_JAR_BASENAME=$(basename $GENERATOR_JAR)
+
+if [ -f $GENERATOR_JAR_BASENAME ]; then
+ if [ "$(openssl dgst -sha256 $GENERATOR_JAR_BASENAME)" \
+ != "SHA256($GENERATOR_JAR_BASENAME)= 24cb04939110cffcdd7062d2f50c6f61159dc3e0ca3b8aecbae6ade53ad3dc8c" \
+ ]; then
+ rm $GENERATOR_JAR_BASENAME
+ fi
+fi
+
+if [ ! -f $GENERATOR_JAR_BASENAME ]; then
+ wget $GENERATOR_JAR
+fi
+
+PYTHON_POST_PROCESS_FILE="black --line-length 79" \
+ java -jar openapi-generator-cli-3.3.4.jar \
+ generate \
+ --input-spec http://unpkg.com/@0x/sra-spec@1.0.11/lib/api.json \
+ --output . \
+ --generator-name python \
+ --config openapi-generator-cli-config.json \
+ --enable-post-process-file