{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ValidationRule",
  "title": "ValidationRule",
  "type": "object",
  "description": "Validation rules and constraints for device setting values.",
  "properties": {
    "type": {
      "type": "string",
      "description": "The data type of the setting. Possible values are `string`, `integer`, `boolean`, `enum` , `password` or `network`.",
      "example": "\"int\""
    },
    "values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Possible values for `enum` or `boolean` types.",
      "example": [
        "0",
        "1",
        "2",
        "NumberOnly"
      ]
    },
    "min": {
      "type": "integer",
      "description": "Minimum value for numeric types.",
      "example": 0
    },
    "max": {
      "type": "integer",
      "description": "Maximum value for numeric types.",
      "example": 10
    },
    "increment": {
      "type": "integer",
      "description": "Increment value for numeric types.",
      "example": 1
    },
    "regex": {
      "type": "string",
      "description": "Regular expression pattern for string validation.",
      "example": "[A-Za-z0-9]+"
    },
    "maxLength": {
      "type": "integer",
      "description": "Maximum length for string values.",
      "example": 255
    },
    "validationHint": {
      "type": "string",
      "description": "Hint to display to users about validation requirements.",
      "example": "5-60"
    }
  }
}