Home SchemaRegistry Class
SchemaRegistry Class
Cancel

SchemaRegistry Class

Namespace: Json.Schema

Inheritance: SchemaRegistry 🡒 object

A registry for schemas.

Properties

NameTypeSummary
FetchFunc<Uri, IBaseDocument>Gets or sets a method to enable automatic download of schemas by $id URI.
GlobalSchemaRegistryThe global registry.

Methods

Get(Uri uri)

Gets a schema by URI ID and/or anchor.

Declaration

1
public IBaseDocument Get(Uri uri)
ParameterTypeDescription
uriUriThe URI ID.

Returns

The schema, if registered in either this or the global registry;4 otherwise null.

Initialize(Uri baseUri, JsonSchema schema)

Sets base URI and spec version for a schema. Generally not needed as this happens automatically on registration and evaluation.

Declaration

1
public void Initialize(Uri baseUri, JsonSchema schema)
ParameterTypeDescription
baseUriUriThe base URI for the schema.
schemaJsonSchemaThe schema

Register(IBaseDocument document)

Registers a schema by URI.

Declaration

1
public void Register(IBaseDocument document)
ParameterTypeDescription
documentIBaseDocumentThe schema.

Register(Uri uri, IBaseDocument document)

Registers a schema by URI.

Declaration

1
public void Register(Uri uri, IBaseDocument document)
ParameterTypeDescription
uriUriThe URI ID of the schema..
documentIBaseDocumentThe schema.
Contents