{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/outsystems/main/json-schema/outsystems-organization-role-api-response-paginated-response-api-schema.json",
  "title": "OrganizationRoleApiResponsePaginatedResponseApi",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/outsystems-organization-roles-api-openapi.yml#/components/schemas/OrganizationRoleApiResponsePaginatedResponseApi",
  "type": "object",
  "properties": {
    "results": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/OrganizationRoleApiResponse"
      },
      "description": "The List of results."
    },
    "page": {
      "allOf": [
        {
          "$ref": "#/$defs/PageInfoWithTotalsApi"
        }
      ],
      "description": "The details of the page information."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "OrgRolePermissionDetailsApiResponse": {
      "type": "object",
      "properties": {
        "permissionKey": {
          "type": "string",
          "description": "Gets or sets the permission key.",
          "format": "uuid"
        },
        "environmentKeys": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "Gets or sets the environment keys."
        },
        "portfolioKeys": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "Gets or sets the portfolio keys."
        },
        "claimName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Gets or sets the claim name."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Gets or sets the permission name."
        }
      },
      "additionalProperties": false
    },
    "OrganizationRoleApiResponse": {
      "required": [
        "permissions"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "Gets or sets the organization role key.",
          "format": "uuid"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Gets or sets the organization role name."
        },
        "permissions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/OrgRolePermissionDetailsApiResponse"
          },
          "description": "Gets or sets the permissions."
        },
        "isReadOnly": {
          "type": "boolean",
          "description": "Gets or sets a value indicating whether the organization role is readonly."
        }
      },
      "additionalProperties": false
    },
    "PageInfoWithTotalsApi": {
      "required": [
        "count",
        "limit",
        "offset"
      ],
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "description": "The results of the current page.",
          "format": "int32"
        },
        "limit": {
          "type": "integer",
          "description": "The limit of results per page.",
          "format": "int32"
        },
        "offset": {
          "type": "integer",
          "description": "The offset of the current page of results.",
          "format": "int32"
        },
        "totalResults": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The total number of results.",
          "format": "int32"
        },
        "nextPageOffset": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The offset of the next page of results. (optional)",
          "format": "int32",
          "readOnly": true
        },
        "totalPages": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The total number of pages with results.",
          "format": "int32",
          "readOnly": true
        }
      },
      "additionalProperties": false
    }
  }
}