I was a little bit bored tonight, so I started to refactor the validation part in the proposed way #6. I think it turned out to be better than I've anticipated. Probably I will add some more specs over the weekend.
Now it is possible to have global validations, while it is still possible to overwrite the validations on request level.
Looks good, and it's a much nicer and more expressive syntax. I guess I can probably simplify the main flapjack-diner spec file to stub responses from the validator for success/failure for each operation...
I was a little bit bored tonight, so I started to refactor the validation part in the proposed way #6. I think it turned out to be better than I've anticipated. Probably I will add some more specs over the weekend.
Now it is possible to have global validations, while it is still possible to overwrite the validations on request level.
Would be happy about feedback.