2323import com .networknt .schema .keyword .AnnotationKeyword ;
2424import com .networknt .schema .keyword .Keyword ;
2525import com .networknt .schema .keyword .NonValidationKeyword ;
26- import com .networknt .schema .keyword .ValidatorTypeCode ;
26+ import com .networknt .schema .keyword .Keywords ;
2727
2828/**
2929 * Represents a vocabulary in meta-schema.
@@ -35,75 +35,75 @@ public class Vocabulary {
3535 // 2019-09
3636 public static final Vocabulary DRAFT_2019_09_CORE = new Vocabulary ("https://json-schema.org/draft/2019-09/vocab/core" ,
3737 new NonValidationKeyword ("$id" ), new NonValidationKeyword ("$schema" ), new NonValidationKeyword ("$anchor" ),
38- ValidatorTypeCode .REF , ValidatorTypeCode .RECURSIVE_REF , new NonValidationKeyword ("$recursiveAnchor" ),
38+ Keywords .REF , Keywords .RECURSIVE_REF , new NonValidationKeyword ("$recursiveAnchor" ),
3939 new NonValidationKeyword ("$vocabulary" ), new NonValidationKeyword ("$comment" ),
4040 new NonValidationKeyword ("$defs" ));
4141 public static final Vocabulary DRAFT_2019_09_APPLICATOR = new Vocabulary (
4242 "https://json-schema.org/draft/2019-09/vocab/applicator" , new NonValidationKeyword ("additionalItems" ),
43- ValidatorTypeCode .UNEVALUATED_ITEMS , ValidatorTypeCode .ITEMS , ValidatorTypeCode .CONTAINS ,
44- ValidatorTypeCode .ADDITIONAL_PROPERTIES , ValidatorTypeCode .UNEVALUATED_PROPERTIES ,
45- ValidatorTypeCode .PROPERTIES , ValidatorTypeCode .PATTERN_PROPERTIES , ValidatorTypeCode .DEPENDENT_SCHEMAS ,
46- ValidatorTypeCode .PROPERTYNAMES , ValidatorTypeCode .IF_THEN_ELSE , new NonValidationKeyword ("then" ),
47- new NonValidationKeyword ("else" ), ValidatorTypeCode .ALL_OF , ValidatorTypeCode .ANY_OF ,
48- ValidatorTypeCode .ONE_OF , ValidatorTypeCode .NOT );
43+ Keywords .UNEVALUATED_ITEMS , Keywords .ITEMS , Keywords .CONTAINS ,
44+ Keywords .ADDITIONAL_PROPERTIES , Keywords .UNEVALUATED_PROPERTIES ,
45+ Keywords .PROPERTIES , Keywords .PATTERN_PROPERTIES , Keywords .DEPENDENT_SCHEMAS ,
46+ Keywords .PROPERTYNAMES , Keywords .IF_THEN_ELSE , new NonValidationKeyword ("then" ),
47+ new NonValidationKeyword ("else" ), Keywords .ALL_OF , Keywords .ANY_OF ,
48+ Keywords .ONE_OF , Keywords .NOT );
4949 public static final Vocabulary DRAFT_2019_09_VALIDATION = new Vocabulary (
50- "https://json-schema.org/draft/2019-09/vocab/validation" , ValidatorTypeCode .MULTIPLE_OF ,
51- ValidatorTypeCode .MAXIMUM , ValidatorTypeCode .EXCLUSIVE_MAXIMUM , ValidatorTypeCode .MINIMUM ,
52- ValidatorTypeCode .EXCLUSIVE_MINIMUM , ValidatorTypeCode .MAX_LENGTH , ValidatorTypeCode .MIN_LENGTH ,
53- ValidatorTypeCode .PATTERN , ValidatorTypeCode .MAX_ITEMS , ValidatorTypeCode .MIN_ITEMS ,
54- ValidatorTypeCode .UNIQUE_ITEMS , ValidatorTypeCode .MAX_CONTAINS , ValidatorTypeCode .MIN_CONTAINS ,
55- ValidatorTypeCode .MAX_PROPERTIES , ValidatorTypeCode .MIN_PROPERTIES , ValidatorTypeCode .REQUIRED ,
56- ValidatorTypeCode .DEPENDENT_REQUIRED , ValidatorTypeCode .CONST , ValidatorTypeCode .ENUM ,
57- ValidatorTypeCode .TYPE );
50+ "https://json-schema.org/draft/2019-09/vocab/validation" , Keywords .MULTIPLE_OF ,
51+ Keywords .MAXIMUM , Keywords .EXCLUSIVE_MAXIMUM , Keywords .MINIMUM ,
52+ Keywords .EXCLUSIVE_MINIMUM , Keywords .MAX_LENGTH , Keywords .MIN_LENGTH ,
53+ Keywords .PATTERN , Keywords .MAX_ITEMS , Keywords .MIN_ITEMS ,
54+ Keywords .UNIQUE_ITEMS , Keywords .MAX_CONTAINS , Keywords .MIN_CONTAINS ,
55+ Keywords .MAX_PROPERTIES , Keywords .MIN_PROPERTIES , Keywords .REQUIRED ,
56+ Keywords .DEPENDENT_REQUIRED , Keywords .CONST , Keywords .ENUM ,
57+ Keywords .TYPE );
5858 public static final Vocabulary DRAFT_2019_09_META_DATA = new Vocabulary (
5959 "https://json-schema.org/draft/2019-09/vocab/meta-data" , new AnnotationKeyword ("title" ),
6060 new AnnotationKeyword ("description" ), new AnnotationKeyword ("default" ), new AnnotationKeyword ("deprecated" ),
61- ValidatorTypeCode .READ_ONLY , ValidatorTypeCode .WRITE_ONLY , new AnnotationKeyword ("examples" ));
61+ Keywords .READ_ONLY , Keywords .WRITE_ONLY , new AnnotationKeyword ("examples" ));
6262 public static final Vocabulary DRAFT_2019_09_FORMAT = new Vocabulary ("https://json-schema.org/draft/2019-09/vocab/format" ,
63- ValidatorTypeCode .FORMAT );
63+ Keywords .FORMAT );
6464 public static final Vocabulary DRAFT_2019_09_CONTENT = new Vocabulary (
6565 "https://json-schema.org/draft/2019-09/vocab/content" , new AnnotationKeyword ("contentMediaType" ),
6666 new AnnotationKeyword ("contentEncoding" ), new AnnotationKeyword ("contentSchema" ));
6767
6868 // 2020-12
6969 public static final Vocabulary DRAFT_2020_12_CORE = new Vocabulary ("https://json-schema.org/draft/2020-12/vocab/core" ,
70- new NonValidationKeyword ("$id" ), new NonValidationKeyword ("$schema" ), ValidatorTypeCode .REF ,
71- new NonValidationKeyword ("$anchor" ), ValidatorTypeCode .DYNAMIC_REF ,
70+ new NonValidationKeyword ("$id" ), new NonValidationKeyword ("$schema" ), Keywords .REF ,
71+ new NonValidationKeyword ("$anchor" ), Keywords .DYNAMIC_REF ,
7272 new NonValidationKeyword ("$dynamicAnchor" ), new NonValidationKeyword ("$vocabulary" ),
7373 new NonValidationKeyword ("$comment" ), new NonValidationKeyword ("$defs" ));
7474 public static final Vocabulary DRAFT_2020_12_APPLICATOR = new Vocabulary (
75- "https://json-schema.org/draft/2020-12/vocab/applicator" , ValidatorTypeCode .PREFIX_ITEMS ,
76- ValidatorTypeCode .ITEMS_202012 , ValidatorTypeCode .CONTAINS , ValidatorTypeCode .ADDITIONAL_PROPERTIES ,
77- ValidatorTypeCode .PROPERTIES , ValidatorTypeCode .PATTERN_PROPERTIES , ValidatorTypeCode .DEPENDENT_SCHEMAS ,
78- ValidatorTypeCode .PROPERTYNAMES , ValidatorTypeCode .IF_THEN_ELSE , new NonValidationKeyword ("then" ),
79- new NonValidationKeyword ("else" ), ValidatorTypeCode .ALL_OF , ValidatorTypeCode .ANY_OF ,
80- ValidatorTypeCode .ONE_OF , ValidatorTypeCode .NOT );
75+ "https://json-schema.org/draft/2020-12/vocab/applicator" , Keywords .PREFIX_ITEMS ,
76+ Keywords .ITEMS_202012 , Keywords .CONTAINS , Keywords .ADDITIONAL_PROPERTIES ,
77+ Keywords .PROPERTIES , Keywords .PATTERN_PROPERTIES , Keywords .DEPENDENT_SCHEMAS ,
78+ Keywords .PROPERTYNAMES , Keywords .IF_THEN_ELSE , new NonValidationKeyword ("then" ),
79+ new NonValidationKeyword ("else" ), Keywords .ALL_OF , Keywords .ANY_OF ,
80+ Keywords .ONE_OF , Keywords .NOT );
8181 public static final Vocabulary DRAFT_2020_12_UNEVALUATED = new Vocabulary (
82- "https://json-schema.org/draft/2020-12/vocab/unevaluated" , ValidatorTypeCode .UNEVALUATED_ITEMS ,
83- ValidatorTypeCode .UNEVALUATED_PROPERTIES );
82+ "https://json-schema.org/draft/2020-12/vocab/unevaluated" , Keywords .UNEVALUATED_ITEMS ,
83+ Keywords .UNEVALUATED_PROPERTIES );
8484 public static final Vocabulary DRAFT_2020_12_VALIDATION = new Vocabulary (
85- "https://json-schema.org/draft/2020-12/vocab/validation" , ValidatorTypeCode .TYPE , ValidatorTypeCode .CONST ,
86- ValidatorTypeCode .ENUM , ValidatorTypeCode .MULTIPLE_OF , ValidatorTypeCode .MAXIMUM ,
87- ValidatorTypeCode .EXCLUSIVE_MAXIMUM , ValidatorTypeCode .MINIMUM , ValidatorTypeCode .EXCLUSIVE_MINIMUM ,
88- ValidatorTypeCode .MAX_LENGTH , ValidatorTypeCode .MIN_LENGTH , ValidatorTypeCode .PATTERN ,
89- ValidatorTypeCode .MAX_ITEMS , ValidatorTypeCode .MIN_ITEMS , ValidatorTypeCode .UNIQUE_ITEMS ,
90- ValidatorTypeCode .MAX_CONTAINS , ValidatorTypeCode .MIN_CONTAINS , ValidatorTypeCode .MAX_PROPERTIES ,
91- ValidatorTypeCode .MIN_PROPERTIES , ValidatorTypeCode .REQUIRED , ValidatorTypeCode .DEPENDENT_REQUIRED );
85+ "https://json-schema.org/draft/2020-12/vocab/validation" , Keywords .TYPE , Keywords .CONST ,
86+ Keywords .ENUM , Keywords .MULTIPLE_OF , Keywords .MAXIMUM ,
87+ Keywords .EXCLUSIVE_MAXIMUM , Keywords .MINIMUM , Keywords .EXCLUSIVE_MINIMUM ,
88+ Keywords .MAX_LENGTH , Keywords .MIN_LENGTH , Keywords .PATTERN ,
89+ Keywords .MAX_ITEMS , Keywords .MIN_ITEMS , Keywords .UNIQUE_ITEMS ,
90+ Keywords .MAX_CONTAINS , Keywords .MIN_CONTAINS , Keywords .MAX_PROPERTIES ,
91+ Keywords .MIN_PROPERTIES , Keywords .REQUIRED , Keywords .DEPENDENT_REQUIRED );
9292 public static final Vocabulary DRAFT_2020_12_META_DATA = new Vocabulary (
9393 "https://json-schema.org/draft/2020-12/vocab/meta-data" , new AnnotationKeyword ("title" ),
9494 new AnnotationKeyword ("description" ), new AnnotationKeyword ("default" ), new AnnotationKeyword ("deprecated" ),
95- ValidatorTypeCode .READ_ONLY , ValidatorTypeCode .WRITE_ONLY , new AnnotationKeyword ("examples" ));
95+ Keywords .READ_ONLY , Keywords .WRITE_ONLY , new AnnotationKeyword ("examples" ));
9696 public static final Vocabulary DRAFT_2020_12_FORMAT_ANNOTATION = new Vocabulary (
97- "https://json-schema.org/draft/2020-12/vocab/format-annotation" , ValidatorTypeCode .FORMAT );
97+ "https://json-schema.org/draft/2020-12/vocab/format-annotation" , Keywords .FORMAT );
9898 public static final Vocabulary DRAFT_2020_12_FORMAT_ASSERTION = new Vocabulary (
99- "https://json-schema.org/draft/2020-12/vocab/format-assertion" , ValidatorTypeCode .FORMAT );
99+ "https://json-schema.org/draft/2020-12/vocab/format-assertion" , Keywords .FORMAT );
100100 public static final Vocabulary DRAFT_2020_12_CONTENT = new Vocabulary (
101101 "https://json-schema.org/draft/2020-12/vocab/content" , new AnnotationKeyword ("contentEncoding" ),
102102 new AnnotationKeyword ("contentMediaType" ), new AnnotationKeyword ("contentSchema" ));
103103
104104 // OpenAPI 3.1
105105 public static final Vocabulary OPENAPI_3_1_BASE = new Vocabulary ("https://spec.openapis.org/oas/3.1/vocab/base" ,
106- new AnnotationKeyword ("example" ), ValidatorTypeCode .DISCRIMINATOR , new AnnotationKeyword ("externalDocs" ),
106+ new AnnotationKeyword ("example" ), Keywords .DISCRIMINATOR , new AnnotationKeyword ("externalDocs" ),
107107 new AnnotationKeyword ("xml" ));
108108
109109 private final String iri ;
0 commit comments