Skip to content

SPTECH-474: document q validation rules and invalid-parameter 400 - #119

Merged
FlaviaC-gyg merged 1 commit into
mainfrom
SPTECH-474/q-validation-rules
Aug 3, 2026
Merged

SPTECH-474: document q validation rules and invalid-parameter 400#119
FlaviaC-gyg merged 1 commit into
mainfrom
SPTECH-474/q-validation-rules

Conversation

@FlaviaC-gyg

@FlaviaC-gyg FlaviaC-gyg commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Context

SPTECH-474: GET /{version}/tours returned an off-contract 503 when q contained no searchable characters (bot probes like q='..';.';.';.'./'). getyourguide/public-partner-api#1975 fixes that to a proper 400. This PR aligns the public spec with actual behavior.

Changes

  • q parameter (spec/components/commons/query.yaml): document that it must contain at least one letter or number, that special characters are ignored, and the 150-character maximum — the length limit has been enforced in production for a long time but was never documented.
  • ToursQuery 400 (spec/paths/tours.yaml): "Missing Parameters" → "Missing or invalid parameters", with the q rules as example.

No schema/type changes — description-only, so generated clients are unaffected.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@FlaviaC-gyg
FlaviaC-gyg requested a review from a team as a code owner August 3, 2026 13:55

@clue-gyg clue-gyg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved as trivial change

Tiny 2-line diff (description-only text changes) in an OpenAPI spec, documenting existing production validation behavior and the 400 response for invalid 'q' values — no schema/type/contract changes, well under the 50-line limit.

@clue-gyg clue-gyg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved as trivial change

Documentation-only change (2 lines modified across two YAML description fields) that clarifies existing 'q' parameter validation and 400 error description to match actual production behavior; no schema/type changes, no new endpoints, no security-sensitive files touched, well under the 50-line limit.

@FlaviaC-gyg
FlaviaC-gyg merged commit 0e45c0e into main Aug 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants