{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stackit/json-schema/stackit-list-user-permissions-response-schema.json",
  "title": "ListUserPermissionsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-users-api-openapi.yml#/components/schemas/ListUserPermissionsResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/UserPermission"
      },
      "type": "array"
    }
  },
  "required": [
    "items"
  ],
  "type": "object",
  "$defs": {
    "ExistingPermission": {
      "properties": {
        "description": {
          "maxLength": 255,
          "title": "A human readable description of the permission",
          "type": "string"
        },
        "name": {
          "maxLength": 255,
          "pattern": "^[a-z](?:[-.]?[a-z]){1,63}$",
          "title": "Permission of the subject",
          "type": "string"
        }
      },
      "required": [
        "name",
        "description"
      ],
      "type": "object"
    },
    "UserPermission": {
      "properties": {
        "permissions": {
          "items": {
            "$ref": "#/$defs/ExistingPermission"
          },
          "type": "array"
        },
        "resourceId": {
          "pattern": "^([a-zA-Z0-9/_|\\-=+@.]{1,})$",
          "title": "The ID of the resource",
          "type": "string"
        },
        "resourceType": {
          "pattern": "^[a-z](?:-?[a-z]){1,63}$",
          "title": "Resource type",
          "type": "string"
        }
      },
      "required": [
        "resourceId",
        "resourceType",
        "permissions"
      ],
      "type": "object"
    }
  }
}