With the new version 1.0.82 we got errors validating our openapi 3.0 documents. The reason is, that we use properties which a allowed by a patternproperties rule in the openapi spec:
"patternProperties": {
"^x-": {
}
Our properties (e.g. x-api-id) are conform with the spec. But the new JDKRegularExpression class fails to validate our property.
The reason is that JDKRegularExpression uses Matcher.matches() to validate the input. This method returns true only if the whole string matches - the regex is treated by matches() Method as 'anchored regex'.
The json schema spec states:
A string instance is considered valid if the regular expression matches the instance successfully. Recall: regular expressions are not implicitly anchored.
I suggest to change JDKRegularExpression to:
@Override
public boolean matches(String value) {
return this.pattern.matcher(value).find();
}
With the new version 1.0.82 we got errors validating our openapi 3.0 documents. The reason is, that we use properties which a allowed by a patternproperties rule in the openapi spec:
Our properties (e.g.
x-api-id) are conform with the spec. But the newJDKRegularExpressionclass fails to validate our property.The reason is that
JDKRegularExpressionusesMatcher.matches()to validate the input. This method returns true only if the whole string matches - the regex is treated bymatches()Method as 'anchored regex'.The json schema spec states:
I suggest to change
JDKRegularExpressionto: