Describe the bug
I have an operation that returns SSEStream<T> and I attached a response example with @@opExample.
When I emit with @typespec/openapi3 targeting **OpenAPI 3.2.0**, the example is missing from the output: the text/event-stream response has itemSchema but no examples.
There's no error or warning, so the example just silently disappears.
The example itself is valid. If I switch the emitter to **OpenAPI 3.0.0**, the same example shows up fine (under examples, next to schema: { type: string }, with the expected streams-not-supported warning). So it only gets dropped on the 3.2.0 stream output.
Versions:
@typespec/compiler: 1.13.0
@typespec/http: 1.13.0
@typespec/openapi3: 1.13.0
@typespec/sse: 0.83.0
@typespec/events: 0.83.0
@typespec/streams: 0.83.0
Reproduction
https://typespec.io/playground/?tspconfig=ZW1pdDoKICAtICJAdHlwZXNwZWMvb3BlbmFwaTMiCm9wdGlvbnPEItQgxBggIMcPLXZlcnPILsQBLSAiMy4yLjAi&c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7CtIZc3Nl1RhldmVudHMiOwoKdXNpbmcgSHR0cDvHDFR5cGVTcGVjLlNTRdEURcU5OwoKQHNlcnZpY2UoI3sgdGl0bGU6ICJTU0UgZXhhbXBsZSBkcm9wcGVkIiB9KQpuYW1lc3BhY2UgUmVwcm87Cgptb2RlbCBNZXNzYWdlIHsKICDkAJs6ICJtxhMiO8QTZXh0OiBzdHJpbmc7Cn0KCkDmALcKdW5pb24g5gCLxT3HSSzFJXJvdXRlKCIvc3RyZWFtIikKQGdldApvcMRKZWFtKCk6IFNTRVPFDTzGRT7kANFAb3BF5gC9KMYqLAogICPEXyAgcmV0dXJu5AEGOsgTICBjb250ZW50xhYi5ACu5gFYLcd6xEDEAWJvZHk6ICJkYXRhOiB7XCLkAOtcIjpc6ADtXCIsXMU%2FxRVoZWxsb1wifVxuXG7HQ33EB8UF6wFt5wCs5wDWIiB9Cik7&vs=%7B%7D
Checklist
Describe the bug
I have an operation that returns
SSEStream<T>and I attached a response example with@@opExample.When I emit with
@typespec/openapi3targeting**OpenAPI 3.2.0**, the example is missing from the output: thetext/event-streamresponse hasitemSchemabut noexamples.There's no error or warning, so the example just silently disappears.
The example itself is valid. If I switch the emitter to
**OpenAPI 3.0.0**, the same example shows up fine (underexamples, next toschema: { type: string }, with the expectedstreams-not-supportedwarning). So it only gets dropped on the 3.2.0 stream output.Versions:
@typespec/compiler: 1.13.0@typespec/http: 1.13.0@typespec/openapi3: 1.13.0@typespec/sse: 0.83.0@typespec/events: 0.83.0@typespec/streams: 0.83.0Reproduction
https://typespec.io/playground/?tspconfig=ZW1pdDoKICAtICJAdHlwZXNwZWMvb3BlbmFwaTMiCm9wdGlvbnPEItQgxBggIMcPLXZlcnPILsQBLSAiMy4yLjAi&c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7CtIZc3Nl1RhldmVudHMiOwoKdXNpbmcgSHR0cDvHDFR5cGVTcGVjLlNTRdEURcU5OwoKQHNlcnZpY2UoI3sgdGl0bGU6ICJTU0UgZXhhbXBsZSBkcm9wcGVkIiB9KQpuYW1lc3BhY2UgUmVwcm87Cgptb2RlbCBNZXNzYWdlIHsKICDkAJs6ICJtxhMiO8QTZXh0OiBzdHJpbmc7Cn0KCkDmALcKdW5pb24g5gCLxT3HSSzFJXJvdXRlKCIvc3RyZWFtIikKQGdldApvcMRKZWFtKCk6IFNTRVPFDTzGRT7kANFAb3BF5gC9KMYqLAogICPEXyAgcmV0dXJu5AEGOsgTICBjb250ZW50xhYi5ACu5gFYLcd6xEDEAWJvZHk6ICJkYXRhOiB7XCLkAOtcIjpc6ADtXCIsXMU%2FxRVoZWxsb1wifVxuXG7HQ33EB8UF6wFt5wCs5wDWIiB9Cik7&vs=%7B%7D
Checklist