{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-openshift/json-schema/red-hat-openshift-add-on-list-schema.json",
  "title": "AddOnList",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-openshift-ocm-addons-mgmt-openapi.yml#/components/schemas/AddOnList",
  "allOf": [
    {
      "$ref": "#/$defs/List"
    }
  ],
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/AddOn"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "AddOn": {
      "description": "Representation of an add-on that can be installed in a cluster.",
      "properties": {
        "config": {
          "$ref": "#/$defs/AddOnConfig"
        },
        "credentials_requests": {
          "description": "List of credentials requests to authenticate operators to access cloud resources",
          "items": {
            "$ref": "#/$defs/CredentialRequest"
          },
          "type": "array"
        },
        "description": {
          "description": "Description of the addon.",
          "type": "string"
        },
        "docs_link": {
          "description": "Link to the documentation about the addon.",
          "type": "string"
        },
        "enabled": {
          "description": "Indicates if this addon can be added to clusters.",
          "type": "boolean"
        },
        "has_external_resources": {
          "description": "Indicates if this addon has external resources associated with it.",
          "type": "boolean"
        },
        "hidden": {
          "description": "Indicates if this addon is hidden",
          "type": "boolean"
        },
        "href": {
          "type": "string"
        },
        "icon": {
          "description": "Base64-encoded icon representing an add-on. The icon should be in PNG format.",
          "format": "byte",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "install_mode": {
          "$ref": "#/$defs/AddOnInstallMode"
        },
        "kind": {
          "type": "string"
        },
        "label": {
          "description": "Label used to attach to a cluster deployment when add-on is installed.",
          "type": "string"
        },
        "managed_service": {
          "description": "Indicates if add-on is part of a managed service",
          "type": "boolean"
        },
        "name": {
          "description": "Name of the add-on.",
          "type": "string"
        },
        "operator_name": {
          "description": "The name of the operator installed by this add-on.",
          "type": "string"
        },
        "parameters": {
          "description": "List of parameters for this add-on.",
          "items": {
            "$ref": "#/$defs/AddOnParameter"
          },
          "type": "array"
        },
        "requirements": {
          "description": "List of resource requirements for this add-on",
          "items": {
            "$ref": "#/$defs/AddOnRequirement"
          },
          "type": "array"
        },
        "resource_cost": {
          "description": "Cost of SKU to be consumed",
          "type": "number"
        },
        "resource_name": {
          "description": "Name of resource SKU to be consumed",
          "type": "string"
        },
        "sub_operators": {
          "description": "List of sub operators managed by this add-on",
          "items": {
            "$ref": "#/$defs/AddOnSubOperator"
          },
          "type": "array"
        },
        "target_namespace": {
          "description": "Namespace in which the addon will be installed",
          "type": "string"
        }
      },
      "type": "object"
    },
    "AddOnConfig": {
      "description": "Representation of an add-on config. The attributes under it are to be used by the addon once its installed in the cluster.",
      "properties": {
        "add_on_environment_variables": {
          "description": "List of environment variables for the addon",
          "items": {
            "$ref": "#/$defs/AddOnEnvironmentVariable"
          },
          "type": "array"
        },
        "add_on_secret_propagations": {
          "description": "List of secret propagations for the addon",
          "items": {
            "$ref": "#/$defs/AddOnSecretPropagation"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AddOnEnvironmentVariable": {
      "description": "Representation of an addon env object",
      "properties": {
        "enabled": {
          "description": "Defines if the env object is active",
          "type": "boolean"
        },
        "name": {
          "description": "Name of the env object",
          "type": "string"
        },
        "value": {
          "description": "Value of the env object",
          "type": "string"
        }
      },
      "type": "object"
    },
    "AddOnInstallMode": {
      "description": "Representation of an add-on InstallMode field.",
      "enum": [
        "all_namespaces",
        "own_namespace"
      ],
      "type": "string"
    },
    "AddOnParameter": {
      "description": "Representation of an add-on parameter.",
      "properties": {
        "addon": {
          "$ref": "#/$defs/AddOn"
        },
        "conditions": {
          "description": "List of conditions of a cluster and its resources to validate parameter",
          "items": {
            "$ref": "#/$defs/AddOnResourceRequirement"
          },
          "type": "array"
        },
        "default_value": {
          "description": "Indicates the value default for the add-on parameter.",
          "type": "string"
        },
        "description": {
          "description": "Description of the add-on parameter.",
          "type": "string"
        },
        "editable": {
          "description": "Indicates if this parameter can be edited after creation.",
          "type": "boolean"
        },
        "editable_direction": {
          "description": "Indicates the direction the addon option can be edited",
          "type": "string"
        },
        "enabled": {
          "description": "Indicates if this parameter is enabled for the add-on.",
          "type": "boolean"
        },
        "id": {
          "description": "Identifier for add-on parameter",
          "type": "string"
        },
        "name": {
          "description": "Name of the add-on parameter.",
          "type": "string"
        },
        "options": {
          "description": "List of options for the add-on parameter value.",
          "items": {
            "$ref": "#/$defs/AddOnParameterOption"
          },
          "type": "array"
        },
        "required": {
          "description": "Indicates if this parameter is required by the add-on.",
          "type": "boolean"
        },
        "validation": {
          "description": "Validation rule for the add-on parameter.",
          "type": "string"
        },
        "validation_err_msg": {
          "description": "Error message to return should the parameter be invalid.",
          "type": "string"
        },
        "value_type": {
          "$ref": "#/$defs/AddOnParameterValueType"
        }
      }
    },
    "AddOnParameterOption": {
      "description": "Representation of an add-on parameter option.",
      "properties": {
        "name": {
          "description": "Name of the add-on parameter option.",
          "type": "string"
        },
        "rank": {
          "description": "Rank value of the add-on parameter option.",
          "format": "int64",
          "type": "integer"
        },
        "requirements": {
          "description": "List of add-on requirements for this parameter option.",
          "items": {
            "$ref": "#/$defs/AddOnRequirement"
          },
          "type": "array"
        },
        "value": {
          "description": "Value of the add-on parameter option.",
          "type": "string"
        }
      }
    },
    "AddOnParameterValueType": {
      "description": "Type of value of the add-on parameter.",
      "enum": [
        "string",
        "boolean",
        "number",
        "cidr",
        "resource",
        "resource_requirement"
      ],
      "type": "string"
    },
    "AddOnRequirement": {
      "allOf": [
        {
          "$ref": "#/$defs/AddOnResourceRequirement"
        },
        {
          "properties": {
            "enabled": {
              "description": "Indicates if this requirement is enabled for the add-on.",
              "type": "boolean"
            },
            "id": {
              "description": "ID of the add-on requirement.",
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "Representation of an add-on requirement."
    },
    "AddOnRequirementResource": {
      "description": "Representation of an add-on requirement resource",
      "enum": [
        "cluster",
        "machine_pool",
        "addon"
      ],
      "type": "string"
    },
    "AddOnRequirementStatus": {
      "description": "Representation of an add-on requirement status.",
      "properties": {
        "error_msgs": {
          "description": "Error messages detailing reasons for unfulfilled requirements.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "fulfilled": {
          "description": "Indicates if this requirement is fulfilled.",
          "type": "boolean"
        }
      }
    },
    "AddOnResourceRequirement": {
      "description": "Representation of a resource requirement",
      "properties": {
        "data": {
          "description": "Data for the add-on requirement.",
          "type": "object"
        },
        "resource": {
          "$ref": "#/$defs/AddOnRequirementResource"
        },
        "status": {
          "$ref": "#/$defs/AddOnRequirementStatus"
        }
      }
    },
    "AddOnSecretPropagation": {
      "description": "Representation of a secret propagation",
      "properties": {
        "destination_secret": {
          "description": "Destination of the secret propagation",
          "type": "string"
        },
        "enabled": {
          "description": "Defines if the secret propagation is active",
          "type": "boolean"
        },
        "id": {
          "description": "ID of the secret propagation",
          "type": "string"
        },
        "source_secret": {
          "description": "Source of the secret propagation",
          "type": "string"
        }
      },
      "type": "object"
    },
    "AddOnSubOperator": {
      "description": "Representation of an add-on sub operator",
      "properties": {
        "addon": {
          "$ref": "#/$defs/AddOn"
        },
        "enabled": {
          "description": "Indicates if this sub operator is enabled for the add-on.",
          "type": "boolean"
        },
        "operator_name": {
          "description": "Name of the add-on sub operator",
          "type": "string"
        },
        "operator_namespace": {
          "description": "Namespace of the add-on sub operator",
          "type": "string"
        }
      }
    },
    "CredentialRequest": {
      "description": "Contains the necessary attributes to allow each operator to access the necessary AWS resources.",
      "properties": {
        "name": {
          "description": "Name of the credentials secret used to access cloud resources",
          "type": "string"
        },
        "namespace": {
          "description": "Namespace where the credentials secret lives in the cluster",
          "type": "string"
        },
        "policy_permissions": {
          "description": "List of policy permissions needed to access cloud resources",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "service_account": {
          "description": "Service account name to use when authenticating",
          "type": "string"
        }
      }
    },
    "List": {
      "properties": {
        "kind": {
          "type": "string"
        },
        "page": {
          "type": "integer"
        },
        "size": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "page",
        "size",
        "total",
        "items"
      ],
      "type": "object"
    }
  }
}