SchemaRegistry interface
Represents a store of registered schemas.
Implemented by SchemaRegistryClient to store the schemas using the Azure Schema Registry service.
Methods
get |
Gets an existing schema by ID. |
get |
Gets the ID of an existing schema with matching name, group, type, and definition. |
register |
Registers a new schema and returns its ID. If schema of specified name does not exist in the specified group, a schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. |
Method Details
getSchema(string, GetSchemaOptions)
Gets an existing schema by ID.
function getSchema(schemaId: string, options?: GetSchemaOptions): Promise<Schema>
Parameters
- schemaId
-
string
Unique schema ID.
- options
- GetSchemaOptions
Returns
Promise<Schema>
Schema with given ID.
getSchemaProperties(SchemaDescription, GetSchemaPropertiesOptions)
Gets the ID of an existing schema with matching name, group, type, and definition.
function getSchemaProperties(schema: SchemaDescription, options?: GetSchemaPropertiesOptions): Promise<SchemaProperties>
Parameters
- schema
- SchemaDescription
Schema to match.
- options
- GetSchemaPropertiesOptions
Returns
Promise<SchemaProperties>
Matched schema's ID.
registerSchema(SchemaDescription, RegisterSchemaOptions)
Registers a new schema and returns its ID.
If schema of specified name does not exist in the specified group, a schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1.
function registerSchema(schema: SchemaDescription, options?: RegisterSchemaOptions): Promise<SchemaProperties>
Parameters
- schema
- SchemaDescription
Schema to register.
- options
- RegisterSchemaOptions
Returns
Promise<SchemaProperties>
Registered schema's ID.