yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

feat: add possibility to define multiple validation patterns

Open p-spacek opened this issue 2 years ago • 4 comments

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

p-spacek avatar Jan 09 '23 15:01 p-spacek

Coverage Status

Coverage: 83.053% (+0.003%) from 83.05% when pulling dcaf2e03571dbe96c5d35262ca066c32a3691cf5 on jigx-com:feat/schema-patterns-validation into 832202fef168a89f39bfc34e93cf2bf3cd49f8a3 on redhat-developer:main.

coveralls avatar Jan 09 '23 15:01 coveralls

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.

gorkem avatar Jan 25 '23 20:01 gorkem

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 avatar Jan 27 '23 13:01 p-spacek

@p-spacek please update the branch

msivasubramaniaan avatar Jan 30 '23 10:01 msivasubramaniaan