Skip to content

Commit 086a069

Browse files
marie-yauk8s-ci-robot
authored andcommitted
fix: add PACKAGE_NAME to client output path for gen/openapi/python.sh (#83) (#87)
1 parent 087e4b4 commit 086a069

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

openapi/python.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ kubeclient::generator::generate_client "${OUTPUT_DIR}"
5454
echo "--- Patching generated code..."
5555

5656
# workaround https://github.com/swagger-api/swagger-codegen/pull/8401
57-
find "${OUTPUT_DIR}/client/" -type f -name \*.py -exec sed -i 's/async=/async_req=/g' {} +
58-
find "${OUTPUT_DIR}/client/" -type f -name \*.py -exec sed -i 's/async bool/async_req bool/g' {} +
59-
find "${OUTPUT_DIR}/client/" -type f -name \*.py -exec sed -i "s/'async'/'async_req'/g" {} +
60-
sed -i "s/if not async/if not async_req/g" "${OUTPUT_DIR}/client/api_client.py"
57+
find "${OUTPUT_DIR}/${PACKAGE_NAME}/" -type f -name \*.py -exec sed -i 's/async=/async_req=/g' {} +
58+
find "${OUTPUT_DIR}/${PACKAGE_NAME}/" -type f -name \*.py -exec sed -i 's/async bool/async_req bool/g' {} +
59+
find "${OUTPUT_DIR}/${PACKAGE_NAME}/" -type f -name \*.py -exec sed -i "s/'async'/'async_req'/g" {} +
60+
sed -i "s/if not async/if not async_req/g" "${OUTPUT_DIR}/${PACKAGE_NAME}/api_client.py"
6161
#
6262

6363
find "${OUTPUT_DIR}/test" -type f -name \*.py -exec sed -i 's/\bclient/kubernetes.client/g' {} +

0 commit comments

Comments
 (0)