np - was very concerned that i'd caused it with my recent refactoring so was extra motivated to understand - the fix/hack was a bonus
thanks. i role out as quick as possible.
Hello everyone, I have a question regarding adding my own rule. I'm a little lost because I'm not really sure where I should be creating my own rules, and how to know if they are being implemented correctly. Should I just add them in a package on zally/server or is it different from the way zalando/zally rulset are implemented? Also do I have to create a rulset if I want to add a single rule? I'm sorry for all the questions but I can't find much info about it (besides the documentation) or even another project that uses zally (if anyone has an example it would be super useful). I'm checking different ways to validate an api and zally caught my attention. Any help is appreciated, thank you!
Hi. Work to make developing custom rules easier is coming along but still not there yet, so the viable options for now are (1) contribute your new rule to Zally itself or (2) forking the repo and adding private rules to your own fork.
All rules need to be in a ruleset, but you can likely add to ZallyRuleSet unless you really have a bunch of related rules that would make better sense as a set.
Hopefully some of that helps. If you're able to keep notes of progress and discoveries along the way then I suspect they could be an invaluable starting point for some sort of user/developer guide!
Thank you! I'm keeping some notes, if they prove to be useful I'll send them
Hi again, I have a question regarding creating my own set of rules. I tried to create a RuleSet in a similar way to ZallyRuleSet but it doesn's seem to be working because when I try to add a Rule to it (ruleSet = MyRuleSet::class) it doesn't work. Is there another thing I should be doing besides creating the MyRuleSet class and setting it?
MyRuleSet needs to implement the RuleSet interface, and likely can extend AbstractRuleSet
I started on an example external ruleset in a separate project last night - it's still work in progress but I'll push it somewhere tonight and share it