docs(api): declare collaborators on the track schema in the OpenAPI spec#946
Merged
Merged
Conversation
…I spec The track response already returns `collaborators` (added in #932), but the embedded swagger spec didn't declare it — so SDK codegen (which generates from this spec) silently omits the field and clients that deserialize via the generated models drop it. Add `collaborators` (array of users) to the `track` and `search_track` schemas so the generated SDK Track/SearchTrack models include it, matching the API's actual response. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Makes the SDK-generated
collaboratorsfield durable.Why
The track response already returns
collaborators(an array of accepted collaborator users, added in #932). But the embedded swagger spec (api/swagger/swagger-v1.yaml, served at/v1/swagger.yaml) never declared it. The apps SDK is generated from this spec viaopenapi-generator, and the generated models'FromJSONTypedonly copy fields present in the spec — socollaboratorswas silently dropped during deserialization, and the field never reached the client even though the API returned it.(The apps PR currently hand-edits the generated
Track.ts/SearchTrack.tsto add the field. That works, but the nextnpm run genwould overwrite it. This PR fixes the root: declare the field in the spec so codegen reproduces it.)Change
Add
collaborators(array ofuser) to thetrackandsearch_trackschemas — the two schemas that produce the SDKTrackandSearchTrackmodels the apps adapter consumes. The generated output (collaborators?: Array<User>+ the standard array-map inFromJSONTyped/ToJSON) exactly matches the apps hand-edit, so a regen is a no-op for those files.Not included (deliberately)
track_collaborator_invite/_accept): the apps SDK notification models are hand-authored as one sharedTrackCollaboratorNotification, but generating two swagger schemas would emit two differently-named models — making this a rename + rewire that needs a verified generator run, not a clean spec addition. Tracked separately./collaboration_invites: no SDK consumer exists yet, so there's nothing for codegen to protect.Spec validates (
YAML OK) and the binary builds (the spec is//go:embed-ed).🤖 Generated with Claude Code