Skip to content

docs: add examples and docs for SSE support#3657

Open
malcolm-kee wants to merge 6 commits intohey-api:mainfrom
malcolm-kee:feat/sse-event
Open

docs: add examples and docs for SSE support#3657
malcolm-kee wants to merge 6 commits intohey-api:mainfrom
malcolm-kee:feat/sse-event

Conversation

@malcolm-kee
Copy link
Contributor

Docs update and examples to clarify SSE support. This is mainly driven by Claude, I'm just verifying the types from the generated code in the example. If the type is correct, I assume the docs should be correct.

Partially resolves #2891

@changeset-bot
Copy link

changeset-bot bot commented Mar 26, 2026

⚠️ No Changeset found

Latest commit: 3ae263d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 26, 2026

@malcolm-kee is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@pullfrog
Copy link

pullfrog bot commented Mar 26, 2026

Reviewed the PR. Found one inaccuracy: the ofetch docs tip incorrectly claims native ofetch hooks apply to SSE connections. SSE uses raw fetch, so only Hey API interceptors apply. Left a comment with a suggested fix. The rest of the docs, example app, and spec are accurate and well-structured.

Task list (7/7 completed)
  • Read the diff TOC and identify major areas of change
  • Review docs changes (client docs + SDK plugin docs)
  • Review the SSE example app (App.tsx, config, spec)
  • Review generated client code in the example
  • Review the OpenAPI spec for SSE
  • Verify docs accuracy against actual generated code
  • Self-critique and submit review
Pullfrog  | [View workflow run](https://github.com/hey-api/openapi-ts/actions/runs/23598380028/job/68721227484) | Triggered by [Pullfrog](https://pullfrog.com) | [𝕏](https://x.com/pullfrogai)

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. docs 📃 Documentation updates. labels Mar 26, 2026
@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.99%. Comparing base (51d56b3) to head (3ae263d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3657   +/-   ##
=======================================
  Coverage   38.99%   38.99%           
=======================================
  Files         515      515           
  Lines       18901    18901           
  Branches     5591     5591           
=======================================
  Hits         7370     7370           
  Misses       9326     9326           
  Partials     2205     2205           
Flag Coverage Δ
unittests 38.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 26, 2026

Open in StackBlitz

@hey-api/codegen-core

npm i https://pkg.pr.new/@hey-api/codegen-core@3657

@hey-api/json-schema-ref-parser

npm i https://pkg.pr.new/@hey-api/json-schema-ref-parser@3657

@hey-api/nuxt

npm i https://pkg.pr.new/@hey-api/nuxt@3657

@hey-api/openapi-ts

npm i https://pkg.pr.new/@hey-api/openapi-ts@3657

@hey-api/shared

npm i https://pkg.pr.new/@hey-api/shared@3657

@hey-api/spec-types

npm i https://pkg.pr.new/@hey-api/spec-types@3657

@hey-api/types

npm i https://pkg.pr.new/@hey-api/types@3657

@hey-api/vite-plugin

npm i https://pkg.pr.new/@hey-api/vite-plugin@3657

commit: 3ae263d

Copy link

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

Low urgency. One inaccurate interceptor claim in the ofetch docs. The rest of the PR is solid — the docs, example, and spec are well-structured and consistent with the actual generated code.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run𝕏

claude and others added 5 commits March 26, 2026 22:37
Cover missing SSE scenarios: path parameter (/stock/{symbol}/watch),
query parameter (interval), and non-200 error response (404).

https://claude.ai/code/session_015wYib3JNLu2XuN6LrJtFED
- Next.js: use client component with useState/useRef, add createUseSse hook factory
- Angular: use @Injectable service with signals, add RxJS Observable alternative
- Nuxt: use <script setup> with ref/onUnmounted, add custom composable pattern

https://claude.ai/code/session_015wYib3JNLu2XuN6LrJtFED
- Angular: show generated @Injectable service with inject(), provideHeyApiClient,
  and instance method pattern (this.#stockService.watchStockPrices)
- Nuxt: add composable caveat (SSE ignores composable option), show #hey-api
  auto-imports, demonstrate Vue ref auto-unwrapping for parameters
- Next.js: add tip that caching options don't apply to SSE streams

https://claude.ai/code/session_015wYib3JNLu2XuN6LrJtFED
docs: fix SSE examples to use actual client-specific features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs 📃 Documentation updates. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs debt

2 participants