MCPcopy Create free account
hub / github.com/apolloconfig/apollo / load_text

Function load_text

scripts/openapi/check_openapi_compatibility.py:77–81  ·  view source on GitHub ↗
(source: str)

Source from the content-addressed store, hash-verified

75
76
77def load_text(source: str) -> str:
78 if source.startswith("http://") or source.startswith("https://"):
79 with urlopen(source, timeout=30) as response:
80 return response.read().decode("utf-8")
81 return Path(source).read_text(encoding="utf-8")
82
83
84def schema_signature(schema: Any) -> Optional[str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected