Files
OSIT-AE-API-FastAPI/tests/e2e/test_e2e_legacy_remote_schema.py
Scott Idem b2384f2869 Tests: Reorganize test suite into functional subdirectories
- Categorized scripts into tests/unit/, tests/integration/, tests/e2e/, and tests/tools/.
- Adopted consistent naming prefixes (test_unit_*, test_int_*, test_e2e_*, tool_*).
- Renamed conftest_mock.py to mock_config_helper.py for clarity.
- Updated test_int_boot_diagnosis.py with sys.path setup for root-level execution.
2026-01-16 10:46:19 -05:00

26 lines
735 B
Python

import requests
import json
BASE_URL = "https://dev-api.oneskyit.com/v3/crud"
ACCOUNT_ID = "nqOzejLCDXM"
def get_headers():
return {"X-Account-ID": ACCOUNT_ID}
def check_schema(obj):
print(f"--- Schema for {obj} ---")
url = f"{BASE_URL}/{obj}/schema"
r = requests.get(url, headers=get_headers())
if r.status_code == 200:
data = r.json()['data']
cols = [c['field'] for col in [data['database']['columns']] for c in col]
print(f"Columns: {cols}")
fields = list(data['model']['fields'].keys())
print(f"Pydantic Fields: {fields}")
else:
print(f"Error {r.status_code}: {r.text}")
if __name__ == "__main__":
check_schema("site")
check_schema("site_domain")