MCPcopy
hub / github.com/PyGithub/PyGithub / resolve_schema

Function resolve_schema

scripts/openapi.py:51–60  ·  view source on GitHub ↗
(schema_type: dict[str, Any], spec: dict[str, Any])

Source from the content-addressed store, hash-verified

49
50
51def resolve_schema(schema_type: dict[str, Any], spec: dict[str, Any]) -> dict[str, Any]:
52 if "$ref" in schema_type:
53 schema = schema_type.get("$ref").strip("# /")
54 ref_schema_type = spec
55 for step in schema.split("/"):
56 if step not in ref_schema_type:
57 raise ValueError(f"Could not find schema in spec: {schema}")
58 ref_schema_type = ref_schema_type[step]
59 return ref_schema_type
60 return schema_type
61
62
63def cst_to_python(value: cst.BaseExpression) -> Any:

Callers 2

as_python_typeFunction · 0.85
__init__Method · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…