MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / resolve_ref

Function resolve_ref

packages/protocol/scripts/lib/openapi_compat_lib.py:71–77  ·  view source on GitHub ↗
(ref: str, schemas: dict[str, typing.Any])

Source from the content-addressed store, hash-verified

69
70
71def resolve_ref(ref: str, schemas: dict[str, typing.Any]) -> dict[str, typing.Any]:
72 if not ref.startswith(_OPENAPI_REF_PREFIX):
73 raise OpenApiCompatError(f"Unsupported ref format: {ref}")
74 schema_name = ref[len(_OPENAPI_REF_PREFIX):]
75 if schema_name not in schemas:
76 raise OpenApiCompatError(f"Missing schema for ref: {ref}")
77 return schemas[schema_name]
78
79
80def _type_signature(

Callers 3

build_schema_manifestFunction · 0.85
_build_minimal_one_ofFunction · 0.85
_build_minimal_valueFunction · 0.85

Calls 1

OpenApiCompatErrorClass · 0.85

Tested by

no test coverage detected