{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-ruleset-schema.json",
  "title": "Ruleset",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-rulesets-and-rules-api-openapi.yml#/components/schemas/Ruleset",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "ruleset"
      ]
    },
    "api_version": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "2.0.0"
      ]
    },
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "title": {
      "type": "string",
      "maxLength": 1023
    },
    "summary": {
      "type": "string",
      "maxLength": 65535
    },
    "description": {
      "type": "string",
      "maxLength": 65535
    },
    "original_name": {
      "type": "string",
      "maxLength": 255
    },
    "rule_count": {
      "type": "integer"
    },
    "ruleset_version": {
      "type": "string"
    },
    "ruleset_type": {
      "type": "string",
      "enum": [
        "global-ibm",
        "global-spectral",
        "global-custom",
        "custom"
      ]
    },
    "ruleset_state": {
      "type": "string",
      "enum": [
        "draft",
        "published",
        "archived"
      ]
    },
    "ruleset_format_type": {
      "type": "string",
      "enum": [
        "1",
        "2"
      ]
    },
    "visibility": {
      "$ref": "#/$defs/ResourceVisibility"
    },
    "rule_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "url": {
      "type": "string",
      "readOnly": true,
      "format": "uri"
    }
  },
  "$defs": {
    "ResourceVisibility": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "public",
            "private",
            "custom"
          ]
        },
        "org_urls": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}