{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-extended-entitlements-schema.json",
  "title": "Tenant Entitlement Result Schema",
  "description": "Tenant entitlement result descriptor",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mgr-tenant-entitlements-openapi.yml#/components/schemas/extendedEntitlements",
  "id": "installation.json",
  "type": "object",
  "properties": {
    "totalRecords": {
      "type": "integer",
      "description": "A total number of records"
    },
    "flowId": {
      "description": "An entitlement flow identifier",
      "type": "string",
      "format": "uuid"
    },
    "entitlements": {
      "type": "array",
      "description": "New, upgraded or revoked entitlement for request",
      "items": {
        "$ref": "#/$defs/entitlement"
      }
    }
  },
  "$defs": {
    "entitlement": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "installation.json",
      "title": "Tenant Entitlement Schema",
      "description": "Tenant entitlement descriptor",
      "type": "object",
      "properties": {
        "applicationId": {
          "description": "A Name-Version id of application",
          "type": "string"
        },
        "tenantId": {
          "description": "A tenant identifier",
          "type": "string",
          "format": "uuid"
        },
        "modules": {
          "description": "A list of module identifiers",
          "type": "array",
          "items": {
            "type": "string",
            "description": "A module identifier"
          }
        }
      },
      "required": [
        "applicationId",
        "tenantId"
      ]
    }
  }
}