microsoft / microsoft/typespec

[http-client-java] Generate HTTP response-to-SSE decoding in service SDKs

Open
#11,941 0 comments 1 reaction 1 assignee Claimed by @XiaofeiCao View on GitHub
emitter:client:java feature
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

### Clear and concise description of the problem

The Java emitter needs to convert streaming HTTP responses into SSE events. Per Azure/azure-sdk-for-java#50264, decoding should be generated into each service SDK's implementation package rather than added to Azure Core.

### Acceptance criteria

- Generated code handles UTF-8, BOM, SSE line endings, multiline `data`, comments, and malformed fields.
- Response closure, completion, errors, and cancellation have deterministic behavior.
- Pending line and event data are bounded with clear failures when limits are exceeded.
- Decoder code remains outside the service SDK's public API and has generated tests.

### Dependencies

- Parent: Azure/azure-sdk-for-java#50264
- Synchronous API contract: Azure/azure-sdk-for-java#50414
- Event representation contract: Azure/azure-sdk-for-java#50415

### Checklist

- [x] Follow our [Code of Conduct](https://github.com/microsoft/typespec/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [docs](https://typespec.io/docs/)
- [x] Checked for an existing duplicate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.