Skip to content

feat!: regenerate SDK from latest chat OpenAPI spec#66

Merged
mogita merged 2 commits into
mainfrom
feat/regenerate-from-chat-oas
Jun 23, 2026
Merged

feat!: regenerate SDK from latest chat OpenAPI spec#66
mogita merged 2 commits into
mainfrom
feat/regenerate-from-chat-oas

Conversation

@mogita

@mogita mogita commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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) sets gradle.properties and rolls the CHANGELOG via standard-version at release time. When releasing, pass 8.0.0.

Added

  • New endpoints: Moderation.analyze, .bulkActionAppeals, .getSetupSession, .upsertSetupSession; Feeds.getOrCreateFollow, .getOrCreateUnfollow, .getUserInterests; Chat.createSegment, .updateSegment, .addSegmentTargets; Common.cancelImportV2Task; Video.reportClientCallEvent, plus the model classes backing them.
  • New webhook events moderation.image_analysis.complete and moderation.text_analysis.complete.

Breaking

  • Moderation.flag(...) now returns StreamRequest<FlagItemResponse> (was FlagResponse). The flag-action acknowledgement (itemID, duration) moved to the new FlagItemResponse; FlagResponse now models the full flag record. Resolves an upstream OpenAPI name collision. The /api/v2/moderation/flag wire response is unchanged; call sites typed on FlagResponse must switch to FlagItemResponse.
  • Removed getters: FlagResponse.getItemID(), FlagResponse.getDuration(), FlagDetails.getExtra().
  • Changed getter return types: 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.
  • Breaking surface enumerated by diffing every modified model's fields/getters against tag 7.2.0 (45 new model files are additive; no model classes removed).

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).
@mogita mogita merged commit ae91ce7 into main Jun 23, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant