Conversation
…velope
BC3 #12381 shipped GET /my/drafts.json — the current user's unpublished
messages, documents, uploads, and client approvals/correspondences,
capped at 250. The Draft envelope is flat and purpose-built, NOT the
shared recording projection. 230 -> 231 operations.
parent and scheduled_posting_at are present on every element and null
when bucket-rooted/unscheduled — modeled required-and-nullable: the
scalar via the established ["string","null"] jsonAdd, and parent (an
object) via anyOf: [$ref, {type: "null"}] with x-go-type *DraftParent,
the first required-nullable object reference in the spec.
anyOf: [$ref, {type: "null"}] — the OpenAPI 3.1 spelling of a
present-but-nullable reference — previously degraded per generator:
Kotlin to JsonElement, Swift to String, Python to Any (TS and Go
already handled it). Kotlin resolves the union to the referenced model
nullable-regardless-of-requiredness; Swift extends schemaIsNullable +
schemaToSwiftType and the supporting-model collector (the $ref hides
inside the union, so DraftParent was never emitted and the build broke);
Python resolves the union to 'Model | None'. Kotlin's supporting-type
scanner still doesn't traverse anyOf, so DraftParent is listed
explicitly in TYPE_ALIASES with a comment.
Go drafts.go wrapper (typed Draft with *DraftParent / *time.Time nullables) + AccountClient.Drafts(); TS client.drafts + root re-exports; Ruby client.rb; Python sync and async clients.
TS/Ruby/Python each decode a two-element feed where one draft is bucket-rooted (parent: null, scheduled_posting_at set) and assert the null survives as null rather than collapsing; 401 surfaces as each SDK's auth error. paths.json case uses a bucket-rooted mock so all five runners pin the required-nullable decode; dispatch added in all five.
Union 192->193 (one new GET); idempotent stays 73. SPEC ceiling narrative and Appendix E, SECURITY's 120 GETs, AGENTS totals. my-drafts flips to absorbed-in-sdk with four smithy_refs and the generator-treatment note; README row.
Member
Author
|
Copilot errored on review (persistent service-side pattern today) and Codex didn't pick this PR up within its window. Merging on green CI: full local |
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.
C6 of the post-v0.11.0 absorption sprint, on the C5 template.
BC3 #12381 shipped
GET /my/drafts.json— the current user's unpublished messages, documents, uploads, and client approvals/correspondences (capped at 250, like/my/assignments). Drafts are private per-user; without this an integration cannot enumerate unpublished work.What
DraftsService(tagDrafts, default-fallback mapping — zero overrides) withListMyDrafts; flat purpose-builtDraftenvelope (NOT the recording projection). 230 → 231 operations.parentandscheduled_posting_atare present on every element and null when bucket-rooted/unscheduled. The scalar uses the established["string","null"]jsonAdd;parentis the spec's first required-nullable object reference, spelledanyOf: [$ref, {type: "null"}]+x-go-type *DraftParent.JsonElement, Swift→String, Python→Any(TS/Go were fine). All three generators now resolve it to the referenced model, nullable: Kotlin'sresolvePropertyType, Swift'sschemaIsNullable/schemaToSwiftTypeand its supporting-model collector (the$refhides inside the union —DraftParentwas silently never emitted, breaking the Swift build), Python'sschema_to_type. Kotlin's supporting-type scanner still doesn't traverse anyOf, soDraftParentis listed explicitly inTYPE_ALIASESwith a comment. End state: Go*DraftParent, TSDraftParent | null, KotlinDraftParent?, SwiftDraftParent?, PythonDraftParent | None.paths.jsonmock is bucket-rooted so all five runners pin the nullable decode (4 passes + TS totals).Verification
Full
makegreen (exit 0) +make kt-check-generated-driftclean.Summary by cubic
Adds the my-drafts surface:
DraftsServicewithListMyDrafts(GET /my/drafts.json) and a flatDraftenvelope to list a user’s unpublished work. Also updates generators so Kotlin, Swift, and Python correctly model required-but-nullable object refs, fixing null handling forparentandscheduled_posting_at.New Features
DraftsServiceandListMyDraftsendpoint; paginated via Link (server cap 250).Draftenvelope withbucket, and required-nullableparentandscheduled_posting_at.parent: null) pinned in all SDKs; 401 cases covered.Generators
anyOf: [$ref, {type:"null"}]to a nullable model type (TS/Go already correct).anyOf; Kotlin listsDraftParentinTYPE_ALIASESpending scanner support.Written for commit 9b0fc97. Summary will update on new commits.