Module adcp.types.generated_poc.extensions.extension_meta

Classes

class AdcpExtensionFileSchema (**data: Any)
Expand source code
class AdcpExtensionFileSchema(AdCPBaseModel):
    field_id: Annotated[
        str,
        Field(
            alias='$id',
            description='Extension ID following pattern /schemas/extensions/{namespace}.json',
            pattern='^/schemas/extensions/[a-z][a-z0-9_]*\\.json$',
        ),
    ]
    field_schema: Annotated[
        Literal['http://json-schema.org/draft-07/schema#'], Field(alias='$schema')
    ]
    additionalProperties: Annotated[
        Any | None,
        Field(description='Whether additional properties are allowed in the extension data'),
    ] = None
    description: Annotated[str, Field(description='Description of what this extension provides')]
    docs_url: Annotated[
        AnyUrl | None, Field(description='URL to documentation for implementors of this extension')
    ] = None
    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
    title: Annotated[str, Field(description='Human-readable title for the extension')]
    type: Annotated[
        Literal['object'],
        Field(description='Extensions must be objects (data within ext.{namespace})'),
    ]
    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

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so that 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. Consumers who want strict validation can override with extra='forbid'.

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_id : str
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