Repository navigation
feat: the meeting note page endpoints, named by operation, not by title - #24
Merged
Merged
Conversation
Upstream added POST /v1/meeting_notes and PATCH
/v1/meeting_notes/{meeting_note_id}, and titled the token a refresh answers
with "Authorization code or refresh token". flatten names a body or response
after its title, so that title renamed it and every schema it holds, and the
names shortNames gave two of them no longer existed. Now the title of each
body and response is dropped before flatten, which names it after its
operation, which upstream cannot change without changing the API. The body
of POST /v1/sessions, titled "Update session request", is so UpdateSession,
as other bodies are named.
A name in shortNames or exactNames that flatten no longer gives now fails the
run with the name it most likely gives instead, where one is likely.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
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.
Generates the meeting-note endpoints from dbfcfee, and makes the generator robust to the kind of upstream change that broke it.
What broke: besides adding the two endpoints, upstream gave the
POST /v1/oauth/tokenresponse the title "Authorization code or refresh token". flatten names a request or response body after its title. So that title renamed the response, and every schema nested in it follows its parent's name. TwoexactNamesentries (CreateATokenOkOwnerUser…) then pointed at names that no longer existed, andgo generatefailed.Robustness
dropBodyTitlesclears the title of every body and response schema before flatten runs. flatten then names each one after its operation, which upstream can't change without changing the API. Upstream's titles there were unreliable anyway: the users list is titled "User", the block-children lists "Block", and the body that creates a session "Update session request". Union alternatives were already named bynameBranches, not by title. With this, upstream adding or changing a title can't cascade into renames.shortNamesorexactNamesentry does go stale, the error now suggests the current name it most likely became: the one sharing the most trailing words, if there's a single best match. For example:CreateATokenOkOwnerUserUserPersonPerson (now AuthorizationCodeOrRefreshTokenOwnerUserUserPersonPerson?).TestLikelyNowcovers it.New endpoints:
Client.CreateMeetingNotePageandClient.UpdateMeetingNotePage, with the typesCreateMeetingNotePage,CreateMeetingNotePageParent,CreateMeetingNotePageCalendarEvent,MeetingNotePageResult,UpdateMeetingNotePageandUpdateMeetingNotePageOk.One type rename:
UpdateSessionRequestbecomesUpdateSession, the body ofPOST /v1/sessions, named after its operation like the other bodies (e.g.CreateAComment). Nothing in notion, worldweaver or atelier refers to it. Every other existing schema name is unchanged.make readypasses. Coverage, measured with Go 1.27.4, is 83.7%.Generated by Claude Code