From cf1680e1d7dc33fbfdc42a54b55cd4508532b4ad Mon Sep 17 00:00:00 2001 From: Flavia Cavaliere Date: Mon, 3 Aug 2026 15:55:13 +0200 Subject: [PATCH] SPTECH-474: document q validation rules and invalid-parameter 400 The implementation has always rejected q values longer than 150 chars with a 400, and getyourguide/public-partner-api#1975 adds the same rejection for q values that contain no letters or numbers (previously an off-contract 503). Document both rules on the q parameter and widen the ToursQuery 400 description accordingly. Co-Authored-By: Claude Fable 5 --- spec/components/commons/query.yaml | 2 +- spec/paths/tours.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/components/commons/query.yaml b/spec/components/commons/query.yaml index c0f8513..4b78ca3 100644 --- a/spec/components/commons/query.yaml +++ b/spec/components/commons/query.yaml @@ -226,7 +226,7 @@ components: $ref: "#/components/schemas/PriceField" type: array q: - description: "Mutually exclusive with 'coordinates' parameter! Query string, can be location name or IATA code. For IATA the query parameter looks like this: 'q=iata:jfk'" + description: "Mutually exclusive with 'coordinates' parameter! Query string, can be location name or IATA code. For IATA the query parameter looks like this: 'q=iata:jfk'. Must contain at least one letter or number and must not exceed 150 characters; special characters are ignored. Queries not meeting these rules are rejected with a 400 response." examples: search_by_IATA: summary: Search by IATA airport codes. diff --git a/spec/paths/tours.yaml b/spec/paths/tours.yaml index 32aab4b..c870002 100644 --- a/spec/paths/tours.yaml +++ b/spec/paths/tours.yaml @@ -45,7 +45,7 @@ paths: items: $ref: "../components/schema/tour.yaml#/components/schemas/Tour" 400: - description: Missing Parameters + description: Missing or invalid parameters, e.g. a 'q' value that contains no letters or numbers or exceeds 150 characters. 500: description: Server error