summaryrefslogtreecommitdiffstats
path: root/python_openapi_client
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-13 11:28:28 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-13 11:32:09 -0700
commitca8faa346c015052b815a0e613b3ad3e840d2c96 (patch)
tree9c51a036e35c6332026d677d29ac61e402ecd38e /python_openapi_client
parenteb6993c6cc40e532cb1462e44408ed30db5244c0 (diff)
downloadfatcat-ca8faa346c015052b815a0e613b3ad3e840d2c96.tar.gz
fatcat-ca8faa346c015052b815a0e613b3ad3e840d2c96.zip
add description removal to codegen script
Diffstat (limited to 'python_openapi_client')
-rwxr-xr-xpython_openapi_client/codegen_python_client.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/python_openapi_client/codegen_python_client.sh b/python_openapi_client/codegen_python_client.sh
index c602bc19..aab3bddb 100755
--- a/python_openapi_client/codegen_python_client.sh
+++ b/python_openapi_client/codegen_python_client.sh
@@ -9,7 +9,8 @@ set -o pipefail
OUTPUT=`pwd`/codegen-out
mkdir -p $OUTPUT
# Strip tags, so entire API is under a single class
-cat ../fatcat-openapi2.yml | grep -v "TAGLINE$" > $OUTPUT/api.yml
+# Also strip long part of description so it doesn't clutter source headers
+cat ../fatcat-openapi2.yml | grep -v "TAGLINE$" | perl -0777 -pe "s/<\!-- STARTLONGDESCRIPTION -->.*<\!-- ENDLONGDESCRIPTION -->//s" > $OUTPUT/api.yml
docker run \
-v $OUTPUT:/tmp/swagger/ \