{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-enterprise-linux-8/json-schema/red-hat-enterprise-linux-8-tailoring-file-json-schema.json",
  "title": "Tailoring File",
  "description": "Defines customizations of rules and variables for a set of profiles",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-enterprise-linux-8-compliance-api-openapi.yml#/components/schemas/tailoring_file_json",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "profiles": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "Profile",
        "description": "A new tailored profile with modifications",
        "additionalProperties": true,
        "anyOf": [
          {
            "required": [
              "id",
              "base_profile_id"
            ]
          },
          {
            "required": [
              "id",
              "title"
            ]
          }
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "New profile identifier, can be same as 'base_profile_id', to 'shadow' the origin"
          },
          "base_profile_id": {
            "type": "string",
            "description": "Original profile identifier, the base for modifications"
          },
          "title": {
            "type": "string",
            "description": "Title for the new profile, inherited from base profile if not given, required if there is no base profile"
          },
          "groups": {
            "type": "object",
            "description": "Group modifications, keys are identifiers",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": true,
              "anyOf": [
                {
                  "required": [
                    "evaluate"
                  ]
                }
              ],
              "properties": {
                "evaluate": {
                  "type": "boolean",
                  "description": "Includes or excludes a group of rules from evaluation"
                }
              }
            }
          },
          "rules": {
            "type": "object",
            "description": "Rule modifications, keys are identifiers",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": true,
              "anyOf": [
                {
                  "required": [
                    "evaluate"
                  ]
                },
                {
                  "required": [
                    "severity"
                  ]
                },
                {
                  "required": [
                    "role"
                  ]
                }
              ],
              "properties": {
                "evaluate": {
                  "type": "boolean",
                  "description": "Includes or excludes a rule from evaluation"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "unknown",
                    "info",
                    "low",
                    "medium",
                    "high"
                  ],
                  "description": "Overrides severity level of the rule"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "full",
                    "unscored",
                    "unchecked"
                  ],
                  "description": "Overrides role of the rule"
                }
              }
            }
          },
          "variables": {
            "type": "object",
            "description": "Variables modifications, keys are identifiers",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": true,
              "oneOf": [
                {
                  "required": [
                    "value"
                  ]
                },
                {
                  "required": [
                    "option_id"
                  ]
                }
              ],
              "properties": {
                "value": {
                  "type": [
                    "string",
                    "integer",
                    "boolean"
                  ],
                  "description": "Directly overrides variable's value with a given value"
                },
                "option_id": {
                  "type": "string",
                  "description": "Overrides variable's value with a predefined value identified by 'option_id'"
                }
              }
            }
          }
        }
      }
    }
  }
}