void IRefResolvable.RegisterSubschemas(SchemaRegistry registry, Uri currentUri) { Schema.RegisterSubschemas(registry, currentUri); }
/// <summary> /// Registers a subschema. To be called from <see cref="IRefResolvable"/> keywords. /// </summary> /// <param name="registry">The registry into which the subschema should be registered.</param> /// <param name="currentUri">The current URI.</param> public void RegisterSubschemas(SchemaRegistry registry, Uri currentUri) { RegisterSubschemasAndGetBaseUri(registry, currentUri); }
void IAnchorProvider.RegisterAnchor(SchemaRegistry registry, Uri currentUri, JsonSchema schema) { registry.RegisterAnchor(currentUri, Value, schema); registry.RegisterDynamicAnchor(currentUri, Value, schema); }
void IAnchorProvider.RegisterAnchor(SchemaRegistry registry, Uri currentUri, JsonSchema schema) { registry.RegisterAnchor(currentUri, Anchor, schema); }
internal IEnumerable <IJsonSchemaKeyword> FilterKeywords(IEnumerable <IJsonSchemaKeyword> keywords, Uri metaSchemaId, SchemaRegistry registry) { while (metaSchemaId != null) { if (metaSchemaId == MetaSchemas.Draft6Id || metaSchemaId == MetaSchemas.Draft7Id) { return(DisallowSiblingRef(keywords)); } if (metaSchemaId == MetaSchemas.Draft201909Id) { return(AllowSiblingRef(keywords)); } var metaSchema = registry.Get(metaSchemaId); if (metaSchema == null) { return(ByOption(keywords)); } metaSchemaId = metaSchema.Keywords.OfType <SchemaKeyword>().FirstOrDefault()?.Schema; } return(ByOption(keywords)); }