1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Проверка 09.02.2025

This commit is contained in:
MoonTestUse1
2025-02-09 01:11:49 +06:00
parent ce52f8a23a
commit 0aa3ef8fc2
5827 changed files with 14316 additions and 1906434 deletions

View File

@@ -2554,8 +2554,13 @@ def _get_all_json_refs(item: Any) -> set[JsonRef]:
current = stack.pop()
if isinstance(current, dict):
for key, value in current.items():
if key == 'examples':
continue # skip examples, allow arbitrary values / refs
if key == 'examples' and isinstance(value, list):
# Skip examples that may contain arbitrary values and references
# (e.g. `{"examples": [{"$ref": "..."}]}`). Note: checking for value
# of type list is necessary to avoid skipping valid portions of the schema,
# for instance when "examples" is used as a property key. A more robust solution
# could be found, but would require more advanced JSON Schema parsing logic.
continue
if key == '$ref' and isinstance(value, str):
refs.add(JsonRef(value))
elif isinstance(value, dict):