{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cheeleong.dev/wwn-system-json/systems/rule.schema.json",
  "title": "WWN Rule",
  "type": "object",
  "allOf": [{ "$ref": "https://cheeleong.dev/wwn-system-json/systems/common.schema.json#/$defs/Entity" }],
  "properties": {
    "@type": { "const": "Rule" },
    "section": { "type": "string", "minLength": 1 },
    "parentRule": { "$ref": "https://cheeleong.dev/wwn-system-json/systems/common.schema.json#/$defs/NodeReference" },
    "steps": { "type": "array", "items": { "type": "string" } },
    "formulae": { "type": "array", "items": { "type": "string" } },
    "relatedRules": { "type": "array", "items": { "$ref": "https://cheeleong.dev/wwn-system-json/systems/common.schema.json#/$defs/NodeReference" }, "uniqueItems": true },
    "relatedTables": { "type": "array", "items": { "$ref": "https://cheeleong.dev/wwn-system-json/systems/common.schema.json#/$defs/NodeReference" }, "uniqueItems": true }
  },
  "required": ["section", "rulesText", "source"],
  "unevaluatedProperties": false
}
