ConfigurationSchema
ConfigurationSchema is a base configuration model that serves as a foundation for various configuration schemas.
This class provides a foundation for defining configuration schemas that can be exported as JSON Schema. It ensures that all derived configuration schemas include a $schema property in their serialized output, pointing to the appropriate schema URL for versioning and validation.
Inherits from: ConfigModel: The base configuration model class.
Member Functions:
check_schema_version
check_schema_version(data: Any)
Pydantic model validator that checks the $schema version before model validation.
If the input data is a dictionary and the $schema field is present, this method delegates to SchemaVersionValidator.validate_schema_version to ensure the schema version is compatible with the current model. If the version is incompatible, a ValueError is raised.
| Name | Type | Description |
|---|---|---|
|
|
The input data to validate. |
- Returns
-
Any— The validated input data.
Raises:
-
ValueError— If the$schemaversion is incompatible or cannot be parsed.
get_schema_url
get_schema_url(base_url: str = "https://packages.vehub.vector.com/schemas")
Constructs the schema URL for this configuration schema instance.
The URL is built using the base URL, the package name derived from the module, the configurable unit version, the schema type (runtime/api/implementation/config), and the snake_case class name.
| Name | Type | Description |
|---|---|---|
|
|
The base URL for schema hosting. Defaults to "https://packages.vehub.vector.com/schemas". |
- Returns
-
str— The full URL to the schema JSON for this configuration schema. Format: {base_url}/{package_name}/{version}/{schema_type}/{snake_class_name}/schema.json