You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new class SpecVersion has been introduced to indicate which version of the specification is used when creating the JsonSchemaFactory. The SpecVersion has an enum and two methods to convert a long to an EnumSet or a set of VersionFlags to a long value.
70
70
71
-
```
71
+
```java
72
72
publicenumVersionFlag {
73
73
74
74
V4(1<<0),
@@ -115,7 +115,7 @@ EXCLUSIVE_MAXIMUM("exclusiveMaximum", "1038", new MessageFormat("{0}: must have
115
115
116
116
The getNonFormatKeywords method is updated to accept a SpecVersion.VersionFlag so that only the keywords supported by the specification will be loaded.
finalList<ValidatorTypeCode> result =newArrayList<ValidatorTypeCode>();
121
121
for (ValidatorTypeCode keyword: values()) {
@@ -137,7 +137,7 @@ For the BUILDIN_FORMATS, there is a common section, and each static class has it
137
137
138
138
The getInstance supports a parameter SpecVersion.VersionFlag to get the right instance of the JsonMetaShema to create the factory. If there is no parameter, then V4 is used by default.
139
139
140
-
```
140
+
```java
141
141
@Deprecated
142
142
publicstatic JsonSchemaFactory getInstance() {
143
143
return getInstance(SpecVersion.VersionFlag.V4);
@@ -170,7 +170,7 @@ public static JsonSchemaFactory getInstance(SpecVersion.VersionFlag versionFlag)
170
170
171
171
This classdetects schema version based on the schema tag.
0 commit comments