A JS tool to validate JSON for Widget.
index.js
file is the start point- There are two main methods.
validateFeedItem
: Validates Widgets for feed. It expects complete Post Model object for feed.validateExploreItem
: Validates Widgets for Explore. It expects complete object for explore screen.
- Header Type
- Slot Type
- Item Type
- Other Predefined types...
If any item is referred with incorrect key. Or Value is not present but still accessed.
If any data is referred with incorrect key. Or Value is not present but still accessed.
If any click/view action is referred with incorrect key. Or Value is not present but still accessed.
If any event is referred with incorrect key. Or Value is not present but still accessed.
If any color is referred with incorrect key. Or Value is not present but still accessed.
If any style is referred with incorrect key. Or Value is not present but still accessed.
If any object has incorrect set of keys.
If placeholder is not satisfied with value.
For e.g. : view
--> action
--> event
--> data
view
is not able to locateaction
action
is not able to locateevent
event
is not able to locate data for its placeholders (if any)action
is not able to locate data for its placeholders (if any)