{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-user-roles-response-dto-schema.json",
  "title": "UserRolesResponseDto",
  "description": "User roles response containing list of roles",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-user-api-openapi.yml#/components/schemas/UserRolesResponseDto",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RoleDetails1"
      },
      "description": "List of roles assigned to the user"
    },
    "totalCount": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of roles assigned to the user"
    },
    "links": {
      "$ref": "#/$defs/PageLinks",
      "type": "object",
      "description": "Pagination links"
    }
  },
  "$defs": {
    "OffsetDateTime": {
      "type": "string",
      "format": "date-time"
    },
    "PageLinks": {
      "type": "object",
      "description": "HATEOAS-style pagination links.",
      "properties": {
        "self": {
          "type": "string",
          "description": "Link to the current page."
        },
        "next": {
          "type": "string",
          "description": "Link to the next page; null on the last page."
        },
        "prev": {
          "type": "string",
          "description": "Link to the previous page; null on the first page."
        }
      }
    },
    "RoleDetails1": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "roleId": {
          "type": "string"
        },
        "createdAt": {
          "$ref": "#/$defs/OffsetDateTime"
        },
        "createdBy": {
          "type": "string"
        }
      }
    }
  }
}