@@ -97,14 +97,34 @@ public Set<ValidationMessage> validate(JsonNode node, JsonNode rootNode, String
97
97
98
98
@ Override
99
99
public void preloadJsonSchema () {
100
- if (null != this .ifSchema ) {
100
+ if (null != this .ifSchema ) {
101
101
this .ifSchema .initializeValidators ();
102
102
}
103
- if (null != this .thenSchema ) {
103
+ if (null != this .thenSchema ) {
104
104
this .thenSchema .initializeValidators ();
105
105
}
106
- if (null != this .elseSchema ) {
106
+ if (null != this .elseSchema ) {
107
107
this .elseSchema .initializeValidators ();
108
108
}
109
109
}
110
+
111
+ @ Override
112
+ public Set <ValidationMessage > walk (JsonNode node , JsonNode rootNode , String at , boolean shouldValidateSchema ) {
113
+ if (shouldValidateSchema ) {
114
+ return validate (node , rootNode , at );
115
+ }
116
+
117
+ if (null != this .ifSchema ) {
118
+ this .ifSchema .walk (node , rootNode , at , false );
119
+ }
120
+ if (null != this .thenSchema ) {
121
+ this .thenSchema .walk (node , rootNode , at , false );
122
+ }
123
+ if (null != this .elseSchema ) {
124
+ this .elseSchema .walk (node , rootNode , at , false );
125
+ }
126
+
127
+ return Collections .emptySet ();
128
+ }
129
+
110
130
}
0 commit comments