import json import re from urllib.parse import urlparse # Load credentials with open("/home/creserver/Desktop/Vaishno_workspace/Jsons/credentials_23-10-2026.json") as f: creds_json = json.load(f) # Load existing documentation data with open("web/docs/index.html") as f: html = f.read() m = re.search(r'', html, re.DOTALL) doc_data = json.loads(m.group(1)) all_doc_eps = [ep for s in doc_data["sections"] for ep in s["eps"]] print(f"Loaded {len(creds_json['data'])} credentials and {len(all_doc_eps)} doc endpoints.") # Build endpoint lookup by path and id ep_by_path = {ep["path"]: ep for ep in all_doc_eps} ep_by_id = {ep["id"]: ep for ep in all_doc_eps} # Let's see how each cred entry maps to endpoints # We will create an API object for each cred: # { # "api_key": "Teeth_Whitener", # "api_ip_link": "https://apigp0006.creinnovations.in/apis/mlm/teeth_whitener/", # "endpoints": [ # { # "method": "POST", # "subpath": "image/", # "full_url": "https://apigp0006.creinnovations.in/apis/mlm/teeth_whitener/image/", # "title": "Natural CIELAB Teeth Whitener", # "summary": "...", # "params": [...], # "chips": [...], # ... # } # ] # } # Let's inspect all matching rules