{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cnccompass-com/json-schema/cnccompass-com-search-request-schema.json",
  "title": "SearchRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cnccompass-com-openapi.yml#/components/schemas/SearchRequest",
  "properties": {
    "query": {
      "maxLength": 5000,
      "minLength": 3,
      "title": "Query",
      "type": "string",
      "description": "A CNC sourcing brief in natural language: material, process, quantity, tolerance, finish, or location. Example: '500 black anodized 6061 aluminum housings, CNC milling, ±0.01 mm bores'."
    },
    "limit": {
      "default": 5,
      "maximum": 20,
      "minimum": 1,
      "title": "Limit",
      "type": "integer",
      "description": "Records per page."
    },
    "offset": {
      "default": 0,
      "maximum": 1000,
      "minimum": 0,
      "title": "Offset",
      "type": "integer",
      "description": "Records to skip. Resend the same query with the previous offset plus page length."
    },
    "material": {
      "anyOf": [
        {
          "maxLength": 80,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional. Overrides the material parsed from the query; matched against the facet vocabulary, an unmatched value is ignored and named in retrieval.ignored_fields. Example: aluminum 6061.",
      "title": "Material"
    },
    "process": {
      "anyOf": [
        {
          "maxLength": 80,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional. Overrides the process parsed from the query; matched against the facet vocabulary, an unmatched value is ignored and named in retrieval.ignored_fields. Example: CNC turning.",
      "title": "Process"
    },
    "finish": {
      "anyOf": [
        {
          "maxLength": 80,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional. Overrides the finish parsed from the query; matched against the facet vocabulary, an unmatched value is ignored and named in retrieval.ignored_fields. Example: anodizing.",
      "title": "Finish"
    },
    "location": {
      "anyOf": [
        {
          "maxLength": 80,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional. Overrides the location parsed from the query; matched against the facet vocabulary, an unmatched value is ignored and named in retrieval.ignored_fields. Example: Dongguan.",
      "title": "Location"
    },
    "certification": {
      "anyOf": [
        {
          "maxLength": 80,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional structured value that overrides what the query says for this field. Only holders are returned. Example: ISO 13485.",
      "title": "Certification"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}