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 08:02:19 +01:00
parent 7727467e29
commit 4326c4d44f

View File

@ -1,6 +1,6 @@
{ {
"ssl_cert_path": "ssl/mx-aare-test.psi.ch.pem", "ssl_cert_path": "ssl/mx-aare-test.psi.ch.pem",
"ssl_key_path": "ss/mx-aare-test.psi.ch.key", "ssl_key_path": "ssl/mx-aare-test.psi.ch.key",
"OPENAPI_URL": "https://mx-aare-test.psi.ch:8000/openapi.json", "OPENAPI_URL": "https://mx-aare-test.psi.ch:8000/openapi.json",
"SCHEMA_PATH": "./src/openapi.json", "SCHEMA_PATH": "./src/openapi.json",
"OUTPUT_DIRECTORY": "./openapi", "OUTPUT_DIRECTORY": "./openapi",