{
  "$id": "https://schema.nfh.global/CatalogSearchAction/v2.0",
  "x-iri": "https://schema.nfh.global/CatalogSearchAction/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CatalogSearchAction",
  "type": "object",
  "description": "The real-world act by which a caller queries the CS (Cataloging Service) for indexed catalogs, applying optional catalog type, network, and schema type filters with pagination control.\n\nThis schema appears in the Catalog Search phase. The PN produces it as the message payload of a POST /catalog/search request; the CS consumes it to filter and return matching catalogs with pagination metadata.\n\nFabric context: Processed by the CS, which queries its catalog index and returns matching items synchronously.\n\nRelationship: Composed as the message payload of the /catalog/search request body.",
  "additionalProperties": false,
  "properties": {
    "filters": {
      "type": "object",
      "description": "Search filters. All fields are optional; omitting a field matches all values for that dimension.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "MASTER",
            "REGULAR"
          ],
          "default": "MASTER",
          "description": "Restricts results to catalogs of the specified type. MASTER — canonical resource definitions reusable across the network. REGULAR — provider-specific catalogs that may extend master resources. Defaults to MASTER when omitted, preserving backward-compatible behaviour for existing implementations."
        },
        "networkIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Filter by network IDs (empty or omitted = all networks)"
        },
        "schemaTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Filter by schema type URIs (empty or omitted = all types)"
        }
      }
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20,
      "description": "Maximum number of catalogs to return per page"
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Zero-based result offset for pagination"
    }
  }
}
