Skip to content

Conversation

@Rezrazi
Copy link

@Rezrazi Rezrazi commented Jan 11, 2026

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR solves a reported issue, reference it using GitHub's linking syntax (e.g., having "fixes #123" present in the PR description)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@joscha @mkusaka @davidgamero @amakhrov

Context:


Summary by cubic

Enable response streaming in Node-generated TypeScript clients by exposing resp.body and adding a stream() method on ResponseBody. This lets consumers read responses as streams without buffering.

  • New Features
    • Node: ResponseBody now has stream(): ReadableStream | null.
    • IsomorphicFetchHttpLibrary returns stream: () => resp.body for Node.
    • Updated samples and SelfDecodingBody to reflect the new API (browser builds unchanged).

Written for commit 7938a11. Summary will update on new commits.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds response streaming support to the TypeScript OpenAPI generator by introducing a new stream() method to the ResponseBody interface for Node.js platforms. The changes enable consumers to access the raw response stream, which is particularly useful for streaming responses from APIs like the Kubernetes client.

Changes:

  • Added stream() method to ResponseBody interface and SelfDecodingBody class for Node.js platforms
  • Updated isomorphic-fetch.ts to expose resp.body through the stream method
  • Regenerated samples across multiple TypeScript build configurations

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
modules/openapi-generator/src/main/resources/typescript/http/isomorphic-fetch.mustache Added stream property to response body object that returns resp.body
modules/openapi-generator/src/main/resources/typescript/http/http.mustache Added stream() method to ResponseBody interface and SelfDecodingBody implementation for Node.js platforms
samples/openapi3/client/petstore/typescript/builds/object_params/http/isomorphic-fetch.ts Generated: Added stream property to body object
samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts Generated: Added stream method (incorrectly as optional)
samples/openapi3/client/petstore/typescript/builds/inversify/http/isomorphic-fetch.ts Generated: Added stream property to body object
samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts Generated: Added stream method (incorrectly as optional)
samples/openapi3/client/petstore/typescript/builds/default/http/isomorphic-fetch.ts Generated: Added stream property to body object
samples/openapi3/client/petstore/typescript/builds/default/http/http.ts Generated: Added stream method correctly as required
samples/openapi3/client/petstore/typescript/builds/browser/http/http.ts Generated: Minor formatting change (added blank line)
samples/client/echo_api/typescript/build/http/isomorphic-fetch.ts Generated: Added stream property to body object
samples/client/echo_api/typescript/build/http/http.ts Generated: Added stream method (incorrectly as optional)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 11 files

Rezrazi and others added 3 commits January 11, 2026 23:02
…ttp/http.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ms/http/http.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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