Module adcp.types.domains.extensions

Types the AdCP extensions schemas declare.

Importing from the domain says which variant you mean, where the flat adcp.types namespace can only bind one class per name:

from adcp.types.domains.extensions import <Type>

A type this domain declares in more than one schema is not here: import it from its own schema's module, adcp.types.domains.extensions.<schema>. Nothing here is renamed.

Auto-generated from the generated domain tree. DO NOT EDIT MANUALLY. Generation date: 2026-10-04 18:45:11 UTC

Sub-modules

adcp.types.domains.extensions.extension_meta

Classes

class AdcpExtensionFileSchema (**data: Any)
Expand source code
class AdcpExtensionFileSchema(AdCPBaseModel):
    field_schema: Annotated[
        Literal['http://json-schema.org/draft-07/schema#'], Field(alias='$schema')
    ] = 'http://json-schema.org/draft-07/schema#'
    title: Annotated[str, Field(description='Human-readable title for the extension')]
    description: Annotated[str, Field(description='Description of what this extension provides')]
    valid_from: Annotated[
        str,
        Field(
            description="Minimum AdCP version this extension is compatible with (e.g., '2.5'). Extension will be included in all versioned schema builds >= this version.",
            pattern='^\\d+\\.\\d+$',
        ),
    ]
    valid_until: Annotated[
        str | None,
        Field(
            description="Last AdCP version this extension is compatible with (e.g., '3.0'). Omit if extension is still valid for current and future versions.",
            pattern='^\\d+\\.\\d+$',
        ),
    ] = None
    docs_url: Annotated[
        AnyUrl | None, Field(description='URL to documentation for implementors of this extension')
    ] = None
    type: Annotated[
        Literal['object'],
        Field(description='Extensions must be objects (data within ext.{namespace})'),
    ] = 'object'
    properties: Annotated[
        dict[str, Any],
        Field(description='Schema properties defining the structure of ext.{namespace} data'),
    ]
    required: Annotated[
        list[str] | None, Field(description='Required properties within the extension data')
    ] = None
    additionalProperties: Annotated[
        Any | None,
        Field(description='Whether additional properties are allowed in the extension data'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var additionalProperties : typing.Any | None
var description : str
var docs_url : pydantic.networks.AnyUrl | None
var field_schema : Literal['http://json-schema.org/draft-07/schema#']
var model_config
var properties : dict[str, typing.Any]
var required : list[str] | None
var title : str
var type : Literal['object']
var valid_from : str
var valid_until : str | None

Inherited members