Refactor OpenAPI fetcher for improved clarity and robustness

Reorganized and enhanced the OpenAPI fetch logic for better maintainability and error handling. Key updates include improved environment variable validation, more detailed error messages, streamlined configuration loading, and additional safety checks for file paths and directories. Added proper logging and ensured the process flow is easy to trace.
This commit is contained in:
GotthardG
2024-12-18 10:56:22 +01:00
parent cb3225b760
commit ea15dbb555
3 changed files with 5 additions and 2 deletions

View File

@ -36,7 +36,7 @@ java -jar openapi-generator-cli.jar generate \
-i openapi.json \
-o python-client/ \
-g python \
--additional-properties=packageName="${NAME}_client",projectName="${NAME}",packageVersion="${VERSION}"
--additional-properties=packageName="${NAME}client",projectName="${NAME}",packageVersion="${VERSION}"
if [[ ! -d python-client ]]; then
echo "Error: Failed to generate Python client."