Skip to content

fix: honor optional request bodies#921

Open
kriptoburak wants to merge 1 commit into
openapistack:mainfrom
kriptoburak:codex/xquik-api-key-security
Open

fix: honor optional request bodies#921
kriptoburak wants to merge 1 commit into
openapistack:mainfrom
kriptoburak:codex/xquik-api-key-security

Conversation

@kriptoburak

@kriptoburak kriptoburak commented Jul 2, 2026

Copy link
Copy Markdown

Summary

  • Add an OpenAPI 3.1 security fixture based on Xquik's public searchTweets contract.
  • Verify a registered apiKey handler authorizes the canonical x-api-key header.
  • Honor requestBody.required instead of inferring required bodies from media-type count.
  • Add regression coverage for omitted optional request bodies.

The request-body fix also resolves #817 and its earlier duplicate #292.

Validation

  • npm ci
  • NODE_ENV=test jest --runInBand (294 tests)
  • npm run build
  • npm run lint
  • npx prettier --check src/validation.ts src/validation.test.ts src/backend.test.ts
  • git diff --check

Add an Xquik API-key security fixture.
@kriptoburak
kriptoburak force-pushed the codex/xquik-api-key-security branch from b0208e9 to 7a8ba48 Compare July 20, 2026 04:03
@kriptoburak kriptoburak changed the title test: cover Xquik api key security fix: honor optional request bodies Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request validation incorrectly treats optional requestBody as required when only one content type is defined

1 participant