fix(openapi): add Notion-Version header to create-a-comment#329
Open
syf2211 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the shared
notionVersionheader parameter to thecreate-a-comment(POST /v1/comments) operation in the vendored OpenAPI spec.Motivation
Fixes #328. Since #320,
HttpClient.buildDefaultHeaders()sourcesNotion-Versionfrom each operation's header-parameterdefaultinscripts/notion-openapi.json.create-a-commentwas the only operation (24 total) missing that parameter, so requests were sent withoutNotion-Versionand Notion returned HTTP 400missing_version.Changes
{ "$ref": "#/components/parameters/notionVersion" }toPOST /v1/comments(create-a-comment).notion-version-coverage.test.tsto assert every operation in the real spec declaresNotion-Version(via shared ref or inline header param).Tests
npm test— 110/110 passedNotion-Versionremains a server-managed header, not an MCP tool input)Notes
retrieve-a-comment(GET /v1/comments) already had the parameter; this looks like an oversight in Add page-as-Markdown tools (retrieve + update) #320 rather than intentional behavior.