INNER CODE UNIT · Python

_uses_legacy_process_state

koxudaxi/datamodel-code-generator · src/datamodel_code_generator/__init__.py:400

def _uses_legacy_process_state(config: GenerateConfig) -> bool:
    """Return whether generation may observe the process working directory."""
    return bool(
        config.custom_template_dir or getattr(config, "custom_class_name_generator", None) or config.custom_formatters
    )


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, ...] = (

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…