{
  "type": "object",
  "properties": {
    "attribute_name": {
      "type": "string"
    },
    "attribute_code": {
      "type": "string"
    },
    "is_required": {
      "type": ["integer", "string"],
      "enum": [0, 1, "0", "1"]
    },
    "display_on_frontend": {
      "type": ["integer", "string"],
      "enum": [0, 1, "0", "1"]
    },
    "sort_order": {
      "type": ["string", "integer"],
      "pattern": "^[0-9]*$"
    },
    "is_filterable": {
      "type": ["integer", "string"],
      "enum": [0, 1, "0", "1"]
    },
    "groups": {
      "type": "array",
      "items": {
        "type": ["string", "integer"],
        "pattern": "^[0-9]*$"
      }
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "option_text": {
            "type": "string"
          },
          "option_id": {
            "type": ["string", "integer"],
            "pattern": "^[1-9][0-9]*$"
          }
        },
        "required": ["option_text"]
      }
    }
  },
  "required": [
    "attribute_code",
    "attribute_name",
    "type",
    "is_required",
    "display_on_frontend",
    "groups"
  ],
  "additionalProperties": true
}
