feat(import): complete OpenAPI onboarding and verify delivery
CI / Rust Checks (pull_request) Failing after 1s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped

This commit is contained in:
bsodfather committed 2026-10-09 17:50:38 +03:00
1 parent bb3e376767
commit e93de7015a
244 files changed
+57020 -5139

No files matched your search

+9 -1
View File
@@ -30,6 +30,10 @@ def reject_duplicates(pairs: list[tuple[str, Any]]) -> dict[str, Any]:
return result
def reject_constant(_value: str) -> Any:
raise ValidationError('/', 'invalid JSON constant')
def load_json(path: Path) -> Any:
try:
raw = path.read_bytes()
@@ -38,7 +42,11 @@ def load_json(path: Path) -> Any:
if len(raw) > MAX_INPUT_BYTES:
raise ValidationError('/', 'input exceeds 64 KiB')
try:
return json.loads(raw.decode('utf-8'), object_pairs_hook=reject_duplicates)
return json.loads(
raw.decode('utf-8'),
object_pairs_hook=reject_duplicates,
parse_constant=reject_constant,
)
except (UnicodeDecodeError, json.JSONDecodeError, RecursionError) as error:
raise ValidationError('/', 'invalid JSON') from error