feat(sra_client.py)
* Code generation scripts * Generated code * Change test config to hit 0x-launch-kit * Ran prettier on generated code * First test case, of get_asset_pairs() * Use launch kit docker image to faciliate CI tests * Fix markdown rendering for GitHub and PyPI * Add URL for PyPI to link back to GitHub * Add one-line package description to README.md * Remove git_push.sh * Remove unimplemented tests * Add sra_client to top-level README package list * Remove repeated-everywhere long description * Add shorcuts for publishing * Remove TypeScript examples
This commit is contained in:
26
python-packages/sra_client/generate.sh
Executable file
26
python-packages/sra_client/generate.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user