Skip to content

Examples multi response#10180

Open
timotheeguerin wants to merge 6 commits intomicrosoft:mainfrom
timotheeguerin:examples-multi-response
Open

Examples multi response#10180
timotheeguerin wants to merge 6 commits intomicrosoft:mainfrom
timotheeguerin:examples-multi-response

Conversation

@timotheeguerin
Copy link
Copy Markdown
Member

No description provided.

@microsoft-github-policy-service microsoft-github-policy-service Bot added lib:http emitter:openapi3 Issues for @typespec/openapi3 emitter labels Mar 27, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http@10180
npm i https://pkg.pr.new/@typespec/openapi3@10180

commit: cf6315a

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2026

All changed packages have been documented.

  • @typespec/http
  • @typespec/openapi3
Show changes

@typespec/http - feature ✏️

[API] Operation returning a union of types without status code or content type will be treated as a single response

@typespec/openapi3 - fix ✏️

Fix examples when operation return type have union of response mapping to same status code

@azure-sdk
Copy link
Copy Markdown
Collaborator

azure-sdk commented Mar 27, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@microsoft-github-policy-service microsoft-github-policy-service Bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Apr 27, 2026
@timotheeguerin timotheeguerin removed the stale Mark a PR that hasn't been recently updated and will be closed. label Apr 28, 2026
@timotheeguerin timotheeguerin marked this pull request as ready for review April 29, 2026 16:21
@timotheeguerin timotheeguerin added the int:azure-specs Run integration tests against azure-rest-api-specs label Apr 29, 2026
Copy link
Copy Markdown
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

It feels like we should have a discriminated union test, and a test over the union variant flattening logic.

Also wonder about the potential for breaking changes in emitters given the changes in the way responses are processed

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

Labels

emitter:openapi3 Issues for @typespec/openapi3 emitter int:azure-specs Run integration tests against azure-rest-api-specs lib:http

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants