{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "scope": {
      "type": "string",
      "enum": [
        "org",
        "project",
        "app"
      ]
    },
    "scopeId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "scopeName": {
      "type": "string",
      "minLength": 1
    },
    "rights": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "design_manager",
          "system:publish",
          "analytics:read",
          "analytics:export",
          "config:read",
          "config:write"
        ]
      }
    }
  },
  "required": [
    "scope",
    "scopeId",
    "scopeName",
    "rights"
  ],
  "additionalProperties": false
}
