Skip to content

Build the generator from chat's tools/openapi - #4290

Merged
laevandus merged 1 commit into
developfrom
chore/cha-5625-build-openapi
Sep 28, 2026
Merged

laevandus merged 1 commit into
developfrom
chore/cha-5625-build-openapi

Conversation

@Acconut

@Acconut Acconut commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Issue Links

🎯 Goal

GetStream/chat#17426 moved the OpenAPI generator out of chat-manager into its own module, tools/openapi, in the chat repo. chat-manager openapi … is now only a compatibility path and will be removed in CHA-5626, so this script has to call the new binary before that happens.

📝 Summary

  • Scripts/openapi_generate.sh builds the generator with make -C tools/openapi build and runs ./build/openapi generate-client … instead of ./build/chat-manager openapi generate-client …. The subcommand and all flags are unchanged.
  • make openapi (the chat repo's spec target) is left as it is.

🛠 Implementation

It's a dev script change only. No SDK code changes, and the generated output doesn't change.

🎨 Showcase

N/A

🧪 Manual Testing Notes

Verification, against chat origin/master at 75d154f053 checked out as the sibling ../chat:

  1. Ran the new script end-to-end (swiftformat 0.63.0 and sourcery 2.3.0 from Homebrew). The log shows make -C tools/openapi build building build/openapi, and ./build/openapi generate-client running against ./releases/v2/chat-clientside-api.yaml. Then I snapshotted Sources/StreamChat/Generated/OpenAPI (178 files). Nothing outside that directory changed.
  2. Reset the output and ran the original script on develop. It regenerated the same spec (chat-clientside-api.yaml, sha256 1b8431ff…386cc4 in both runs) and ran ./build/chat-manager openapi generate-client.
  3. Compared the two runs file by file with cmp: all 178 files are byte-identical, and the file list and git status match exactly.

I reverted the regenerated output afterwards, so this PR only contains the script change. The unrelated spec drift from regenerating is not included.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

Summary by CodeRabbit

  • Chores
    • Updated the OpenAPI client generation workflow to run the OpenAPI build step and use the current client generator. Existing generator options remain unchanged, and this update does not change end-user-facing behavior.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 449847cd-2779-45e3-bd71-55e7b861b3e7

📥 Commits

Reviewing files that changed from the base of the PR and between e3dde48 and 99922cd.

📒 Files selected for processing (1)
  • Scripts/openapi_generate.sh

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The OpenAPI generation script now builds the OpenAPI tool and invokes its generate-client command instead of invoking the command through chat-manager. The generator arguments remain unchanged.

Changes

OpenAPI client generation

Layer / File(s) Summary
Build and run the OpenAPI generator
Scripts/openapi_generate.sh
The script runs make -C tools/openapi build, then invokes ./build/openapi generate-client. The remaining generator arguments are unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Suggested reviewers: laevandus

Merge Risk: ⚪ Minimal · up to 99922

No confirmed issue blocks merging. The sibling chat repository was unavailable, so the direct generator command could not be independently checked here.

Architecture Summary

Architecture risk: 🔵 Low · up to 99922

The change affects 1 system.

Changed systems: Scripts

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Scripts (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Scripts/openapi_generate.sh: The generation step now builds the OpenAPI tool and runs its generate-client command; it no longer invokes chat-manager openapi generate-client.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: building the OpenAPI generator from chat's tools/openapi instead of using the compatibility path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
1 Message
📖 Skipping Danger since the Pull Request is classed as Draft/Work In Progress

Generated by 🚫 Danger

@Acconut
Acconut marked this pull request as ready for review September 28, 2026 09:42
@Acconut
Acconut requested a review from a team as a code owner September 28, 2026 09:42

@laevandus laevandus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Verified

@laevandus
laevandus merged commit 5ca7538 into develop Sep 28, 2026
20 checks passed
@laevandus
laevandus deleted the chore/cha-5625-build-openapi branch September 28, 2026 11:45
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.

2 participants