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
The schema validation part of the Messaging is a great way to catch errors at the point of reporting from content scripts. It is, however, missing some features that would enable more sophisticated use in future studies:
there is no way to mark a field as optional or alternatively specify which are required
there is no way to specify more than one type
Some possibilities:
build these two features into the current schema validation. It wouldn't be too hard to take the syntax from json schema and implement those here.
use a well-tested / pre-existing schema validation library like ajv
The text was updated successfully, but these errors were encountered:
use a well-tested / pre-existing schema validation library like ajv
I like this idea. We developed the current schema system as an ad hoc means of minimizing foreseeable bugs. Switching to a standard schema system and library should be (relatively) painless, since our schemas are simple and we can integrate a library into the build.
The schema validation part of the
Messaging
is a great way to catch errors at the point of reporting from content scripts. It is, however, missing some features that would enable more sophisticated use in future studies:optional
or alternatively specify which arerequired
Some possibilities:
ajv
The text was updated successfully, but these errors were encountered: