{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TaxYearRuleDiffRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "baseline_source_ids",
    "current_source_ids",
    "tax_years",
    "topics"
  ],
  "properties": {
    "baseline_source_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "nec_2025",
          "nec_2026",
          "w2_2025",
          "w2_2026"
        ]
      }
    },
    "current_source_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "nec_2025",
          "nec_2026",
          "w2_2025",
          "w2_2026"
        ]
      }
    },
    "tax_years": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "from": {
          "const": 2025
        },
        "to": {
          "const": 2026
        }
      }
    },
    "topics": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "backup_withholding_exception",
          "misc_covered_threshold",
          "misc_fields",
          "nec_covered_threshold",
          "nec_fields",
          "w2_fields",
          "w2_w3_deadline"
        ]
      }
    },
    "caller_assertions": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "assertion_id",
          "topic",
          "field_path",
          "expected_value"
        ],
        "properties": {
          "assertion_id": {
            "type": "string",
            "pattern": "^as_[a-z0-9_]{1,47}$"
          },
          "topic": {
            "type": "string",
            "enum": [
              "backup_withholding_exception",
              "misc_covered_threshold",
              "misc_fields",
              "nec_covered_threshold",
              "nec_fields",
              "w2_fields",
              "w2_w3_deadline"
            ]
          },
          "field_path": {
            "type": "string",
            "enum": [
              "changes.due_date_rule.after.day",
              "changes.due_date_rule.after.kind",
              "changes.due_date_rule.after.month",
              "changes.due_date_rule.after.published_adjusted_date",
              "changes.due_date_rule.before.day",
              "changes.due_date_rule.before.kind",
              "changes.due_date_rule.before.month",
              "changes.due_date_rule.before.published_adjusted_date",
              "changes.fact.after.currency",
              "changes.fact.after.deduction_eligibility_determined",
              "changes.fact.after.fields.cash_tips_included_in_1a",
              "changes.fact.after.fields.cash_tips_reported_to_employer",
              "changes.fact.after.fields.nonemployee_compensation",
              "changes.fact.after.fields.other",
              "changes.fact.after.fields.qualified_overtime",
              "changes.fact.after.fields.qualified_overtime_included_in_1a",
              "changes.fact.after.fields.treasury_tipped_occupation_codes",
              "changes.fact.after.minimum_inclusive",
              "changes.fact.after.nonqualifying_occupation_sentinel",
              "changes.fact.after.published_due_date",
              "changes.fact.after.recipient_agency",
              "changes.fact.after.ttoc_max_codes",
              "changes.fact.before.currency",
              "changes.fact.before.dedicated_2026_TP_TT_14b_fields",
              "changes.fact.before.dedicated_2026_tip_overtime_fields",
              "changes.fact.before.fields.nonemployee_compensation",
              "changes.fact.before.minimum_inclusive",
              "changes.fact.before.published_due_date",
              "changes.fact.before.recipient_agency",
              "changes.threshold.after.amount_cents",
              "changes.threshold.after.basis",
              "changes.threshold.after.currency",
              "changes.threshold.after.operator",
              "changes.threshold.before.amount_cents",
              "changes.threshold.before.basis",
              "changes.threshold.before.currency",
              "changes.threshold.before.operator",
              "status"
            ]
          },
          "expected_value": {
            "type": [
              "string",
              "integer",
              "boolean",
              "null"
            ]
          }
        }
      }
    }
  }
}
