{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexus/json-schema/nexus-api-privilege-application-schema.json",
  "title": "ApiPrivilegeApplication",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexus-security-management-privileges-api-openapi.yml#/components/schemas/ApiPrivilegeApplication",
  "required": [
    "actions",
    "domain",
    "name"
  ],
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "The type of privilege, each type covers different portions of the system. External values supplied to this will be ignored by the system."
    },
    "name": {
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$",
      "type": "string",
      "description": "The name of the privilege.  This value cannot be changed."
    },
    "description": {
      "type": "string"
    },
    "readOnly": {
      "type": "boolean",
      "description": "Indicates whether the privilege can be changed. External values supplied to this will be ignored by the system."
    },
    "actions": {
      "minItems": 1,
      "type": "array",
      "description": "A collection of actions to associate with the privilege, using BREAD syntax (browse,read,edit,add,delete,all) as well as 'run' for script privileges.",
      "items": {
        "type": "string",
        "description": "A collection of actions to associate with the privilege, using BREAD syntax (browse,read,edit,add,delete,all) as well as 'run' for script privileges.",
        "enum": [
          "READ",
          "BROWSE",
          "EDIT",
          "ADD",
          "DELETE",
          "RUN",
          "START",
          "STOP",
          "ASSOCIATE",
          "DISASSOCIATE",
          "ALL"
        ]
      }
    },
    "domain": {
      "minLength": 1,
      "type": "string",
      "description": "The domain (i.e. 'blobstores', 'capabilities' or even '*' for all) that this privilege is granting access to.  Note that creating new privileges with a domain is only necessary when using plugins that define their own domain(s)."
    }
  }
}