@@ -248,8 +248,8 @@ The following types are used in the above definitions
248
248
249
249
* **OutputFormat**: **FLAG**
250
250
251
- Only the ` FLAG ` output format is part of the Stable API. Additional output
252
- formats are included as part of the Experimental API.
251
+ Only the ` FLAG ` output format is part of the Stable API. Additional [ output
252
+ formats](#output-formats) are included as part of the Experimental API.
253
253
* **OutputUnit**: { valid: boolean }
254
254
255
255
Output is an experimental feature of the JSON Schema specification. There
@@ -336,7 +336,8 @@ These are available from the `@hyperjump/json-schema/bundle` export.
336
336
The ` FLAG ` output format isn't very informative. You can change the output
337
337
format used for validation to get more information about failures. The official
338
338
output format is still evolving, so these may change or be replaced in the
339
- future.
339
+ future. This implementation currently supports the BASIC and DETAILED output
340
+ formats.
340
341
341
342
` ` ` javascript
342
343
import { BASIC } from " @hyperjump/json-schema/experimental" ;
@@ -536,28 +537,21 @@ These are available from the `@hyperjump/json-schema/experimental` export.
536
537
validation of its own. In these cases, it isn't helpful to include
537
538
them in BASIC output. This flag is used to trim those nodes from the
538
539
output.
539
- * collectEvaluatedProperties?: (compiledKeywordValue: any, instance: JsonNode, context: ValidationContext, isTop?: boolean) => Set\< string> | false
540
-
541
- If the keyword is an applicator, it will need to implement this
542
- function for ` unevaluatedProperties` to work as expected.
543
- * collectEvaluatedItems?: (compiledKeywordValue: A, instance: JsonNode, context: ValidationContext, isTop?: boolean) => Set\< number> | false
544
-
545
- If the keyword is an applicator, it will need to implement this
546
- function for ` unevaluatedItems` to work as expected.
547
- * collectExternalIds?: (visited: Set\< string>, parentSchema: Browser, schema: Browser) => Set\< string>
548
- If the keyword is an applicator, it will need to implement this
549
- function to work properly with the [bundle](#bundling) feature.
550
- * annotation?: (compiledKeywordValue: any) => any
540
+ * annotation?: (compiledKeywordValue: any) => any | undefined
551
541
552
542
If the keyword is an annotation, it will need to implement this
553
543
function to return the annotation.
544
+ * plugin?: EvaluationPlugin
554
545
555
546
* **ValidationContext**: object
556
547
* ast: AST
557
- * dynamicAnchors: object
558
- * schemaUrl: string
559
- * errors: OutputUnit[]
560
- * annotations: OutputUnit[]
548
+ * plugins: EvaluationPlugins[]
549
+
550
+ * **EvaluationPlugin**: object
551
+ * beforeSchema(url: string, instance: JsonNode, context: Context): void
552
+ * beforeKeyword(keywordNode: Node<any>, instance: JsonNode, context: Context, schemaContext: Context, keyword: Keyword): void
553
+ * afterKeyword(keywordNode: Node<any>, instance: JsonNode, context: Context, valid: boolean, schemaContext: Context, keyword: Keyword): void
554
+ * afterSchema(url: string, instance: JsonNode, context: Context, valid: boolean): void
561
555
* **defineVocabulary**: (id: string, keywords: { [keyword: string]: string }) => void
562
556
563
557
Define a vocabulary that maps keyword name to keyword URIs defined using
@@ -596,7 +590,7 @@ These are available from the `@hyperjump/json-schema/experimental` export.
596
590
* **getSchema**: (uri: string, browser?: Browser) => Promise\< Browser>
597
591
598
592
Get a schema by it's URI taking the local schema registry into account.
599
- * buildSchemaDocument: (schema: SchemaObject | boolean, retrievalUri?: string, contextDialectId?: string) => SchemaDocument
593
+ * ** buildSchemaDocument** : (schema: SchemaObject | boolean, retrievalUri?: string, contextDialectId?: string) => SchemaDocument
600
594
601
595
Build a SchemaDocument from a JSON-compatible value. You might use this if
602
596
you're creating a custom media type plugin, such as supporting JSON Schemas
0 commit comments