Skip to content

Conversation

@iscai-msft
Copy link
Contributor

fixes #3862

@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Jan 29, 2026
@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 29, 2026

All changed packages have been documented.

  • @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-client-generator-core - feature ✏️

Add .streamMetadata for sse events streamed in or out

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 29, 2026

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-client-generator-core@3867

commit: c5db9b7

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 29, 2026

You can try these changes here

🛝 Playground 🌐 Website

): [SdkStreamMetadata, readonly Diagnostic[]] {
const diagnostics = createDiagnosticCollector();
const bodyType = diagnostics.pipe(
getClientTypeWithDiagnostics(context, tspStreamMetadata.bodyType, operation),
Copy link
Member

Choose a reason for hiding this comment

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

I'm just wondering if these stream models need usage flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooh, that's a very good point. I think we want it just for .streamType, since that's what emitters need to gxenerate deserialization / serialization code. So it should be input / output. The question is if we need json for it. I think yes, but also the json flag was added for how csharp serializes json models, so not sure how applicable that would be in the streaming scenario. I think from a pure tcgc standpoint though, the json usage makes sense though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also updated access for the stream type based off of the operation, might be a bit unnecessary, but I figure why not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tcgc] add stream metadata to returned objects

3 participants