{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rwth-aachen-university/json-schema/rwth-aachen-university-search-result-dto-paged-search-response-schema.json",
  "title": "SearchResultDtoPagedSearchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rwth-aachen-university-search-api-openapi.yml#/components/schemas/SearchResultDtoPagedSearchResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/SearchResultDto"
      }
    },
    "isSuccess": {
      "type": "boolean",
      "readOnly": true
    },
    "statusCode": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "traceId": {
      "type": [
        "string",
        "null"
      ]
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    },
    "categories": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/SearchCategory"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Pagination": {
      "type": "object",
      "properties": {
        "currentPage": {
          "type": "integer",
          "description": "Gets or sets the current page number.",
          "format": "int32"
        },
        "totalPages": {
          "type": "integer",
          "description": "Gets or sets the total number of pages.",
          "format": "int32"
        },
        "pageSize": {
          "type": "integer",
          "description": "Gets or sets the number of items per page.",
          "format": "int32"
        },
        "totalCount": {
          "type": "integer",
          "description": "Gets or sets the total count of items across all pages.",
          "format": "int64"
        },
        "hasPrevious": {
          "type": "boolean",
          "description": "Gets a value indicating whether there is a previous page.",
          "readOnly": true
        },
        "hasNext": {
          "type": "boolean",
          "description": "Gets a value indicating whether there is a next page.",
          "readOnly": true
        }
      },
      "additionalProperties": false,
      "description": "Represents pagination information for a collection of items."
    },
    "SearchCategory": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the search category."
        },
        "count": {
          "type": "integer",
          "description": "The count of occurrences for the search category.",
          "format": "int64"
        }
      },
      "additionalProperties": false,
      "description": "Represents a search category with a name and count of occurrences."
    },
    "SearchCategoryType": {
      "enum": [
        "None",
        "https://purl.org/coscine/terms/structure#Metadata",
        "https://purl.org/coscine/terms/structure#Project",
        "https://purl.org/coscine/terms/structure#Resource"
      ],
      "type": "string",
      "description": "Specifies the search item type."
    },
    "SearchResultDto": {
      "required": [
        "source",
        "type",
        "uri"
      ],
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The URI associated with the search result.",
          "format": "uri"
        },
        "type": {
          "$ref": "#/$defs/SearchCategoryType"
        },
        "source": {
          "description": "The dynamic source data for the search result."
        }
      },
      "additionalProperties": false,
      "description": "Represents a Data Transfer Object (DTO) for search results."
    }
  }
}