{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/normapi-com/main/json-schema/normapi-com-rule-explained-schema.json",
  "title": "RuleExplained",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/normapi-com-validation-api-openapi.yml#/components/schemas/RuleExplained",
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "language": {
      "type": "string",
      "enum": [
        "de",
        "en"
      ]
    },
    "explanation": {
      "$ref": "#/$defs/Explanation"
    }
  },
  "required": [
    "code",
    "language",
    "explanation"
  ],
  "$defs": {
    "Explanation": {
      "type": "object",
      "properties": {
        "meaning": {
          "type": "string",
          "description": "What the rule actually requires, in ordinary language."
        },
        "cause": {
          "type": "string",
          "description": "Why an invoice typically trips it."
        },
        "fix": {
          "type": "string",
          "description": "What to change to make it pass."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Where the rule is explained on the site: its own page, with an XML\nexample for the common rules, or its entry on a rule-group page.\n"
        }
      },
      "required": [
        "meaning",
        "cause",
        "fix",
        "url"
      ]
    }
  }
}