Initial commit: SIBU 2.0 MISSION
This commit is contained in:
16
backend/parse_openapi_v2.py
Normal file
16
backend/parse_openapi_v2.py
Normal file
@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
with open("vertexdc_openapi.json", "r", encoding="utf-16" if "\xFF\xFE" in open("vertexdc_openapi.json", "rb").read(2).decode("latin-1", errors="ignore") else "utf-8") as f:
|
||||
try:
|
||||
content = f.read()
|
||||
# Clean potential BOM or leading spaces
|
||||
content = content.strip()
|
||||
data = json.loads(content)
|
||||
for path in data.get("paths", {}):
|
||||
if "/api/users" in path:
|
||||
print(path)
|
||||
except Exception as e:
|
||||
print(f"Error parsing JSON: {e}")
|
||||
# Let's print the first 100 chars to see what's wrong
|
||||
f.seek(0)
|
||||
print(f"Start of file: {f.read(100)!r}")
|
||||
Reference in New Issue
Block a user