[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.
This commit is contained in:
2026-02-10 12:43:26 +00:00
parent 1ea17695ec
commit 005c947dae
9 changed files with 185 additions and 255 deletions

View File

@@ -1,31 +1,26 @@
import requests
import json
import os
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 = ("admin", "gemini")
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", "CompanyUpdate"]
print("--- API SCHEMAS FOUND ---")
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))
else:
print(f"\nSchema {schema_name} not found.")
except Exception as e:
print(f"Error: {e}")
logger.error(f"Error parsing CE OpenAPI: {e}")
if __name__ == "__main__":
parse_openapi()
parse_openapi()