SchemaManagerSettings

pydantic settings safir.kafka.SchemaManagerSettings

Settings for constructing a PydanticSchemaManager.

Parameters:

Show JSON schema
{
   "title": "SchemaManagerSettings",
   "description": "Settings for constructing a `~safir.kafka.PydanticSchemaManager`.",
   "type": "object",
   "properties": {
      "registryUrl": {
         "description": "URL of a a Confluent-compatible schema registry",
         "format": "uri",
         "minLength": 1,
         "title": "Schema registry URL",
         "type": "string"
      },
      "suffix": {
         "default": "",
         "description": "A suffix that is added to the schema name (and thus the subject name). The suffix creates alternate subjects in the Schema Registry so schemas registered during testing and staging don't affect the compatibility continuity of a production subject. For production, it's best to not set a suffix.",
         "examples": [
            "_dev1"
         ],
         "title": "Suffix",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "registryUrl"
   ]
}

Config:
  • env_prefix: str = SCHEMA_MANAGER_

  • populate_by_name: bool = True

Fields:
field registry_url: AnyUrl [Required]

URL of a a Confluent-compatible schema registry

field suffix: str = ''

A suffix that is added to the schema name (and thus the subject name). The suffix creates alternate subjects in the Schema Registry so schemas registered during testing and staging don’t affect the compatibility continuity of a production subject. For production, it’s best to not set a suffix.

make_manager(logger=None)

Construct a PydanticSchemaManager from the fields of this model.

Parameters:

logger (BoundLogger | None, default: None)

Return type:

PydanticSchemaManager

to_registry_params()

Make a dict of params to construct an AsyncSchemaRegistryClient.

Return type:

SchemaRegistryClientParams