matthiasn / systems-toolbox

Tools and building blocks for building Systems in Clojure and ClojureScript
Eclipse Public License 1.0
174 stars 23 forks source link

No way to validate an empty message. #49

Closed kamituel closed 6 years ago

kamituel commented 6 years ago

Currently, valid-or-no-spec? doesn't warn about missing spec for a command when the message has no payload.

This means it's not possible to add a spec saying "this message should be empty". Opening this issue to discuss whether this should be possible.

matthiasn commented 6 years ago

Hey @kamituel, thanks, yes I think that would be useful to document the expectation that a message has no payload. I will try out the change in existing projects and get back to you later today. Cheers

matthiasn commented 6 years ago

Yup, this is useful, I added it in the latest version. Please have a look and let me know what you think. Cheers

matthiasn commented 6 years ago

Closing this for now as there is now support for validating empty messages. Please re-open if there are any further questions, or if it doesn't work for you. Thanks