moban icon indicating copy to clipboard operation
moban copied to clipboard

Add yaml value validators/normalisers

Open jayvdb opened this issue 7 years ago • 3 comments

One use of plugins is to validate and 'fix' yaml values.

e.g. if a value for foo was a string "abc", but template now expects a list, a normaliser plugin foo_validator could return an array with one item , ['abc']

jayvdb avatar Jun 04 '18 10:06 jayvdb

We can start this by using jinja2schema to create list of template vars and compare with yaml vars, which is https://github.com/moremoban/moban/issues/130 .

This will be an important change to moban plugin api.

that api change should also support other validation.

jayvdb avatar Jan 24 '19 05:01 jayvdb

Assigning to myself.

ayan-b avatar Mar 03 '19 04:03 ayan-b

Since some part of this is not a moban exclusive problem, I think it would be a good idea to create different module altogether.

ayan-b avatar Mar 03 '19 06:03 ayan-b