You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design a way for participants to declare which fields and parameters they expect in their workitems, as well as constraints on their values (such as type, element type, string-matches-regexp, string-in-enum, that kind of thing).
Design considerations:
The declarations should be in the participants, so that people will
actually update them as the participant changes
The Exo should guarantee that the constraints are met before the
participant gets the workitem.
The declarations should be passive data structures, so that they
can be processed without running participant-specific code.
The syntax should support concepts like "integer as string" and
"list as string" because ruote often passes stringified parameters
like that.
Possibilities:
Declaring optional parameters may be useful for documentation,
and allows typechecking on those parameters
Declaring output fields may be helpful in the future for
automated checking of compatibility between participants
It may be possible to generate documentation from these declarations,
but don't let that complicate the basic design.
Alternately, it may be possible parse the declarations from the docstring.
The output of this task should be a document describing the
syntax and suggested implementation, ready for discussion.
Activity
iamer commentedon Jan 19, 2012
From pami :
http://www.alexconrad.org/2012/01/make-validation-suck-less.html
And the validictory JSON validation library seems quite promising
https://github.com/sunlightlabs/validictory