yaml-language-server
yaml-language-server copied to clipboard
feat: add possibility to define multiple validation patterns
What does this PR do?
add the possibility to define multiple validation patterns The previous implementation supported only single pattern and single patternErrorMessage. It was too hard to define various validations. With this implementation, it's possible to define multiple patterns (conditions) with more specific messages
What issues does this PR fix or reference?
no ref
Is it tested? How?
unit test
Coverage: 83.053% (+0.003%) from 83.05% when pulling dcaf2e03571dbe96c5d35262ca066c32a3691cf5 on jigx-com:feat/schema-patterns-validation into 832202fef168a89f39bfc34e93cf2bf3cd49f8a3 on redhat-developer:main.
Does the jsonSchema specification have patterns as arrays with the additional fields that you have added here? I can not seem to find a reference to it.
Does the jsonSchema specification have patterns as arrays with the additional fields that you have added here? I can not seem to find a reference to it.
Unfortunately not, it's a custom implementation, it's not based on jsonSchema standard. Is it a problem? It can be quite useful to be able to define 'validation conditions'.
@p-spacek please update the branch