{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wagevitals-com/json-schema/wagevitals-com-cna-rules-schema.json",
  "title": "CnaRules",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wagevitals-com-openapi.json#/components/schemas/CnaRules",
  "type": "object",
  "required": [
    "meta",
    "federal",
    "states"
  ],
  "properties": {
    "meta": {
      "$ref": "#/$defs/Meta"
    },
    "federal": {
      "type": "object",
      "properties": {
        "rule": {
          "type": "string"
        },
        "citation": {
          "type": "string",
          "format": "uri"
        },
        "checked": {
          "type": "string",
          "format": "date"
        },
        "facts": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Fact"
          }
        }
      }
    },
    "states": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "usps",
          "name",
          "checked",
          "facts"
        ],
        "properties": {
          "usps": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "page": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "checked": {
            "type": "string",
            "format": "date"
          },
          "federal_minimum_applies": {
            "type": "boolean"
          },
          "facts": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/$defs/Fact"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "Fact": {
      "type": "object",
      "required": [
        "value",
        "source_url",
        "checked"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "value": {
          "description": "Text, number or yes/no as the source states it."
        },
        "source_url": {
          "type": "string",
          "format": "uri"
        },
        "source_title": {
          "type": "string"
        },
        "source_kind": {
          "type": "string"
        },
        "checked": {
          "type": "string",
          "format": "date"
        },
        "source_dated": {
          "type": "string",
          "format": "date"
        },
        "quote": {
          "type": "string"
        }
      }
    },
    "Meta": {
      "type": "object",
      "required": [
        "title",
        "schema_version",
        "self",
        "data_checked",
        "reuse"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "schema_version": {
          "type": "string"
        },
        "self": {
          "type": "string",
          "format": "uri"
        },
        "page": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "data_checked": {
          "type": "string",
          "format": "date"
        },
        "method": {
          "type": "string",
          "format": "uri"
        },
        "reuse": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}