INNER CODE UNIT · Python
is_openapi
koxudaxi/datamodel-code-generator · src/datamodel_code_generator/__init__.py:407
def is_openapi(data: Mapping[str, Any]) -> bool:
"""Check if the data dict is an OpenAPI specification."""
return "openapi" in data
def is_asyncapi(data: Mapping[str, Any]) -> bool:
"""Check if the data dict is an AsyncAPI specification."""
return "asyncapi" in data
JSON_SCHEMA_URLS: tuple[str, ...] = (
"http://json-schema.org/",
"https://json-schema.org/",
)
def is_schema(data: dict) -> bool:
"""Check if the data dict is a JSON Schema."""