{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/axle/json-schema/axle-validation-config-schema.json",
  "title": "ValidationConfig",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/axle-api-openapi.yml#/components/schemas/ValidationConfig",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unqiue identifier of the Validation template. You'll use this to make requests to the [Validate Policy with Template](/api-reference/validation/templates/validate-policy-template) endpoint."
    },
    "displayName": {
      "type": "string",
      "description": "User friendly name of the template."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO 8601 timestamp at which the Validation template was created."
    },
    "modifiedAt": {
      "type": "string",
      "description": "ISO 8601 timestamp at which the Validation template was last modified."
    },
    "rules": {
      "type": "array",
      "description": "List of rules to be evaluated against the Policy object.",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/RuleTemplateWithNoInput"
          },
          {
            "$ref": "#/$defs/RuleTemplateWithInput"
          }
        ]
      }
    },
    "metadata": {
      "type": "object",
      "description": "Custom information stored on the template, if provided when the template was created or updated via [Create Template](/api-reference/validation/templates/create-template), [Create Platform Template](/api-reference/platform/create-templates), or [Update Template](/api-reference/validation/templates/update-template)."
    }
  },
  "required": [
    "id",
    "displayName",
    "rules",
    "createdAt",
    "modifiedAt"
  ],
  "$defs": {
    "RuleTemplateWithInput": {
      "title": "Rule With Input",
      "type": "object",
      "properties": {
        "rule": {
          "type": "string",
          "enum": [
            "collision-coverage-meets-requirements",
            "comprehensive-coverage-meets-requirements",
            "bodily-injury-coverage-meets-requirements",
            "property-damage-coverage-meets-requirements",
            "dwelling-coverage-meets-requirements",
            "uninsured-underinsured-bi-coverage-meets-requirements",
            "uninsured-underinsured-pd-coverage-meets-requirements",
            "expiration-date-comparison",
            "insureds-match",
            "properties-match",
            "address-match",
            "required-policy-information-is-present",
            "vehicle-use-meets-requirements",
            "third-party-matches"
          ]
        },
        "input": {
          "type": "object",
          "description": "Input configuration to evaluate the rule. See [Supported Rules](/guides/policy-validation#supported-rules) for details on which Rules require additional input.",
          "properties": {
            "inputKey": {
              "type": "object",
              "description": "The inputKey is the key corresponding to the Rule input, e.g., \"vin\" or \"deductible\".",
              "properties": {
                "source": {
                  "type": "string",
                  "description": "The key used to look up this input's value at evaluation time. Axle resolves the value by checking (in order of priority):\n\n1. The `metadata` object passed in the [Validate Policy with Template](/api-reference/validation/templates/validate-policy-template) request body.\n2. The `metadata` object via [Start Ignition](/api-reference/ignition/start-ignition).\n3. The `default` value defined on this input (if set).\n\nFor example, if `source` is `\"maxDeductible\"`, Axle will look for a key named `maxDeductible` in the metadata objects above."
                },
                "default": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array"
                    }
                  ],
                  "description": "Fallback value used when the `source` key is not found in either the request body metadata or the Ignition session metadata. If no `default` is provided and the key is not found, the rule will be evaluated without this input."
                }
              },
              "required": [
                "source"
              ]
            }
          }
        }
      },
      "required": [
        "rule",
        "input"
      ]
    },
    "RuleTemplateWithNoInput": {
      "title": "Rule With No Input",
      "type": "object",
      "properties": {
        "rule": {
          "type": "string",
          "enum": [
            "policy-active",
            "rental-covered-for-collision"
          ]
        }
      },
      "required": [
        "rule"
      ]
    }
  }
}