added possible null values to all web_search properties to match the optional parameter design. Otherwise the strict schema forbids empty parameters and return BadRequest

This commit is contained in:
krut_ni 2026-05-12 17:23:44 +02:00
parent d7bf542c1e
commit 7c5acf3b45
No known key found for this signature in database
GPG Key ID: A5C0151B4DDB172C

View File

@ -59,43 +59,68 @@
"description": "The search query." "description": "The search query."
}, },
"categories": { "categories": {
"type": "array", "type": [
"array",
"null"
],
"description": "Optional list of SearXNG categories to use for the search.", "description": "Optional list of SearXNG categories to use for the search.",
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"engines": { "engines": {
"type": "array", "type": [
"array",
"null"
],
"description": "Optional list of specific SearXNG engines to use when the user requests them explicitly.", "description": "Optional list of specific SearXNG engines to use when the user requests them explicitly.",
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"language": { "language": {
"type": "string", "type": [
"string",
"null"
],
"description": "Optional language code for the search." "description": "Optional language code for the search."
}, },
"time_range": { "time_range": {
"type": "string", "type": [
"string",
"null"
],
"description": "Optional time range filter for engines that support it.", "description": "Optional time range filter for engines that support it.",
"enum": [ "enum": [
null,
"day", "day",
"month", "month",
"year" "year"
] ]
}, },
"page": { "page": {
"type": "integer", "type": [
"integer",
"null"
],
"description": "Optional search result page number starting at 1." "description": "Optional search result page number starting at 1."
}, },
"limit": { "limit": {
"type": "integer", "type": [
"integer",
"null"
],
"description": "Optional maximum number of results to return to the model after local truncation." "description": "Optional maximum number of results to return to the model after local truncation."
} }
}, },
"required": [ "required": [
"query" "query",
"categories",
"engines",
"language",
"time_range",
"page",
"limit"
], ],
"additionalProperties": false "additionalProperties": false
} }