Skip to content

Commit

Permalink
Add openapi-generator CLI option to skip SDK v2 test generation (#2338)
Browse files Browse the repository at this point in the history
Signed-off-by: Antonin Stefanutti <[email protected]>
  • Loading branch information
astefanutti authored Nov 28, 2024
1 parent 6b98bd0 commit 2adb2cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hack/python-sdk-v2/gen-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ if [[ ! -f "$SWAGGER_CODEGEN_JAR" ]]; then
fi

echo "Generating Python SDK for Training Operator V2 ..."
java -jar "${SWAGGER_CODEGEN_JAR}" generate -i "${SWAGGER_CODEGEN_FILE}" -g python -o "${SDK_OUTPUT_PATH}" -c "${SWAGGER_CODEGEN_CONF}" -p=packageVersion="${SDK_VERSION}"
java -jar "${SWAGGER_CODEGEN_JAR}" generate -i "${SWAGGER_CODEGEN_FILE}" -g python \
-o "${SDK_OUTPUT_PATH}" \
-c "${SWAGGER_CODEGEN_CONF}" \
-p=packageVersion="${SDK_VERSION}" \
--global-property apiTests=false,modelTests=false # TODO (andreyvelich): Discuss if we should use these test files.

echo "Removing unused files for the Python SDK"
git clean -f ${SDK_OUTPUT_PATH}/.openapi-generator
Expand All @@ -50,8 +54,5 @@ git clean -f ${SDK_OUTPUT_PATH}/setup.py
git clean -f ${SDK_OUTPUT_PATH}/test-requirements.txt
git clean -f ${SDK_OUTPUT_PATH}/tox.ini

# TODO (andreyvelich): Discuss if we should use these test files.
git clean -f ${SDK_OUTPUT_PATH}/test

# Revert the README since it is manually created.
git checkout ${SDK_OUTPUT_PATH}/README.md

0 comments on commit 2adb2cb

Please sign in to comment.