Skip to content

fix(openapi): add Notion-Version header to create-a-comment#329

Open
syf2211 wants to merge 1 commit into
makenotion:mainfrom
syf2211:fix/create-comment-notion-version
Open

fix(openapi): add Notion-Version header to create-a-comment#329
syf2211 wants to merge 1 commit into
makenotion:mainfrom
syf2211:fix/create-comment-notion-version

Conversation

@syf2211

@syf2211 syf2211 commented Jul 2, 2026

Copy link
Copy Markdown

Summary

Add the shared notionVersion header parameter to the create-a-comment (POST /v1/comments) operation in the vendored OpenAPI spec.

Motivation

Fixes #328. Since #320, HttpClient.buildDefaultHeaders() sources Notion-Version from each operation's header-parameter default in scripts/notion-openapi.json. create-a-comment was the only operation (24 total) missing that parameter, so requests were sent without Notion-Version and Notion returned HTTP 400 missing_version.

Changes

  • Add { "$ref": "#/components/parameters/notionVersion" } to POST /v1/comments (create-a-comment).
  • Add notion-version-coverage.test.ts to assert every operation in the real spec declares Notion-Version (via shared ref or inline header param).

Tests

  • npm test — 110/110 passed
  • New coverage test fails on the pre-fix spec and passes after the one-line OpenAPI change
  • No snapshot updates required (Notion-Version remains a server-managed header, not an MCP tool input)

Notes

POST /v1/comments was the only operation missing the shared
notionVersion parameter after makenotion#320, so HttpClient never attached
Notion-Version and Notion returned 400 missing_version.

Add a spec coverage test so every operation must declare the header.
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.

Bug: create-a-comment (POST /v1/comments) 400s with missing_version — only op missing Notion-Version param after #320

1 participant