From a21d737986b743f7529ccd4b39d3fb81ef91de3d Mon Sep 17 00:00:00 2001 From: ssube Date: Sat, 15 Jun 2019 20:04:20 -0500 Subject: [PATCH] docs: basic description of rules --- docs/rules.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/rules.md diff --git a/docs/rules.md b/docs/rules.md new file mode 100644 index 0000000..a6dd56c --- /dev/null +++ b/docs/rules.md @@ -0,0 +1,50 @@ +# Rules + +Rules apply a schema fragment to a set of nodes selected from the original data. + +- [Rules](#rules) + - [Metadata](#metadata) + - [Name](#name) + - [Desc](#desc) + - [Level](#level) + - [Tags](#tags) + - [Data](#data) + - [Select](#select) + - [Filter](#filter) + - [Check](#check) + +## Metadata + +### Name + +The rule name for running single rules. + +### Desc + +The rule description for error messaging. + +### Level + +The rule log level. + +### Tags + +A list of tags for the rule. Used for inclusion and exclusion. + +## Data + +### Select + +JSON path used to select nodes from the data. + +### Filter + +Schema fragment used to filter selected nodes. + +If a node matches the `select` path but does not match this schema, it will be skipped. + +### Check + +Schema fragment used to check selected nodes. + +This is the real rule.