confluent-kafka-dotnet
Show / Hide Table of Contents

Class JsonSchemaResolver

JSON Schema Resolver.

Inheritance
object
JsonSchemaResolver
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Confluent.SchemaRegistry.Serdes
Assembly: Confluent.SchemaRegistry.Serdes.Json.dll
Syntax
public class JsonSchemaResolver
Remarks

JsonSchemaResolver provides GetResolvedSchema() function that can be used to get the NJsonSchema.JsonSchema object corresponding to a resolved parent schema with a list of reference schemas. Assuming that the references have been registered in the schema registry already.

Constructors

JsonSchemaResolver(ISchemaRegistryClient, Schema, JsonSchemaGeneratorSettings)

Initialize a new instance of the JsonSchemaResolver class.

Declaration
public JsonSchemaResolver(ISchemaRegistryClient schemaRegistryClient, Schema schema, JsonSchemaGeneratorSettings jsonSchemaGeneratorSettings = null)
Parameters
Type Name Description
ISchemaRegistryClient schemaRegistryClient

Confluent Schema Registry client instance that would be used to fetch the reference schemas.

Schema schema

Schema to use for validation, used when external schema references are present in the schema. Populate the References list of the schema for the same.

JsonSchemaGeneratorSettings jsonSchemaGeneratorSettings

Schema generator setting to use.

Methods

GetResolvedSchema()

Get the resolved JsonSchema instance for the Schema provided to the constructor.

Declaration
public Task<JsonSchema> GetResolvedSchema()
Returns
Type Description
Task<JsonSchema>
In this article