Files
Brancheneinstufung2/connector-superoffice/parse_ce_openapi.py
Floke 005c947dae [2ff88f42] refactor(connector-superoffice): finalize production readiness cleanup
- Integrated centralized logging system in all modules.
- Extracted all IDs and ProgIds into a separate .
- Refactored  and  for cleaner dependency management.
- Included updated discovery and inspection utilities.
- Verified end-to-end workflow stability.
2026-02-10 12:43:26 +00:00

26 lines
881 B
Python

import requests
import json
from config import Config
from logging_config import setup_logging
logger = setup_logging("ce_parser")
def parse_openapi():
# Use CE IP directly for this local tool
url = "http://172.17.0.1:8000/openapi.json"
auth = (Config.CE_API_USER, Config.CE_API_PASSWORD)
try:
resp = requests.get(url, auth=auth, timeout=5)
resp.raise_for_status()
spec = resp.json()
schemas = spec.get("components", {}).get("schemas", {})
target_schemas = ["CompanyCreate", "BulkImportRequest"]
for schema_name in target_schemas:
if schema_name in schemas:
print(f"\nSchema: {schema_name}")
print(json.dumps(schemas[schema_name], indent=2))
except Exception as e:
logger.error(f"Error parsing CE OpenAPI: {e}")
if __name__ == "__main__":
parse_openapi()