feat!: regenerate SDK from latest chat OpenAPI spec#66
Merged
Conversation
Regenerate the model classes and service interfaces from the current chat OpenAPI spec. New endpoints: Moderation.analyze, .bulkActionAppeals, .getSetupSession, .upsertSetupSession; Feeds.getOrCreateFollow, .getOrCreateUnfollow, .getUserInterests; Chat.createSegment, .updateSegment, .addSegmentTargets; Common.cancelImportV2Task; Video.reportClientCallEvent. Plus the new moderation.image_analysis.complete and moderation.text_analysis.complete webhook events. BREAKING CHANGE: source- and binary-incompatible for Java consumers. Moderation.flag(...) now returns StreamRequest<FlagItemResponse> (was FlagResponse); the flag-action acknowledgement (itemID, duration) moved to the new FlagItemResponse and FlagResponse now models the full flag record. Removed getters FlagResponse.getItemID()/getDuration() and FlagDetails.getExtra(); changed getter return types on ChannelInput/ChannelDataUpdate.getConfigOverrides(), FlagDetails.getAutomod(), and ChatMessageResponse.getAttachments()/getOwnReactions()/ getLatestReactions(). Warrants a major version bump. The version bump itself is handled at release time by initiate_release (workflow_dispatch version input -> gradle.properties + standard-version), so no version files are touched here.
flag() now returns FlagItemResponse and ban() returns ModerationBanResponse after the OpenAPI regeneration. Update the hand-maintained ModerationTest assignments accordingly, and add the ban() return-type change to the CHANGELOG breaking list (it was missed in the first pass).
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.
Regenerates the model classes and service interfaces from the current chat OpenAPI spec.
Versioning: major (8.0.0)
Java is statically typed, so the changes below are source- and binary-incompatible (changed return types, removed/retyped getters). Consumer code won't compile. This warrants a major bump, unlike the dynamic SDKs (php/ruby/python) where the same OAS changeset was a defensible minor.
No version files are touched in this PR:
initiate_release(workflow_dispatch with the version input) setsgradle.propertiesand rolls the CHANGELOG via standard-version at release time. When releasing, pass8.0.0.Added
Moderation.analyze,.bulkActionAppeals,.getSetupSession,.upsertSetupSession;Feeds.getOrCreateFollow,.getOrCreateUnfollow,.getUserInterests;Chat.createSegment,.updateSegment,.addSegmentTargets;Common.cancelImportV2Task;Video.reportClientCallEvent, plus the model classes backing them.moderation.image_analysis.completeandmoderation.text_analysis.complete.Breaking
Moderation.flag(...)now returnsStreamRequest<FlagItemResponse>(wasFlagResponse). The flag-action acknowledgement (itemID,duration) moved to the newFlagItemResponse;FlagResponsenow models the full flag record. Resolves an upstream OpenAPI name collision. The/api/v2/moderation/flagwire response is unchanged; call sites typed onFlagResponsemust switch toFlagItemResponse.FlagResponse.getItemID(),FlagResponse.getDuration(),FlagDetails.getExtra().ChannelInput.getConfigOverrides()/ChannelDataUpdate.getConfigOverrides()->ChannelConfigOverrides;FlagDetails.getAutomod()->AutomodDetailsResponse;ChatMessageResponse.getAttachments()->List<Attachment>;getOwnReactions()/getLatestReactions()->List<ChatReactionResponse>.The 45 new model classes and the 2 new webhook events are additive.
Verification
./gradlew compileJava(offline): BUILD SUCCESSFUL../gradlew spotlessCheck(offline): BUILD SUCCESSFUL.7.2.0(45 new model files are additive; no model classes removed).