Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Schema

Package version

Schema definition with its unique ID, version, and location. Class representing a Schema.

Hierarchy

Index

Constructors

constructor

Properties

content

content: string

String representation of schema.

id

id: string

ID that uniquely identifies a schema in the registry namespace.

location

location: string

URL of schema by group and name.

locationById

locationById: string

URL of schema by ID.

serializationType

serializationType: string

Serialization type of schema. Currently only 'avro' is supported, but this is subject to change.

version

version: number

Automatically incremented version number of the schema.

Methods

getById

  • Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace.

    Parameters

    • schemaId: string

      References specific schema in registry namespace.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<SchemaGetByIdResponse>

queryIdByContent

  • Gets the ID referencing an existing schema within the specified schema group, as matched by schema content comparison.

    Parameters

    • groupName: string

      Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request.

    • schemaName: string

      Name of the registered schema.

    • xSchemaType: SerializationType

      Serialization type for the schema being registered.

    • schemaContent: string

      String representation of the registered schema.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<SchemaQueryIdByContentResponse>

register

  • Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1.

    Parameters

    • groupName: string

      Schema group under which schema should be registered. Group's serialization type should match the serialization type specified in the request.

    • schemaName: string

      Name of schema being registered.

    • xSchemaType: SerializationType

      Serialization type for the schema being registered.

    • schemaContent: string

      String representation of the schema being registered.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<SchemaRegisterResponse>

Generated using TypeDoc