Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix response examples with union not showing up correctly #4046

Merged
merged 19 commits into from
Aug 5, 2024

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Jul 29, 2024

fix #4033

A few issues:

  • Example being empty
  • Example duplicating for all responses instead of mapping to the right one

@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Jul 29, 2024
@timotheeguerin timotheeguerin changed the title Fix response examples not showing up correctly Fix response examples with union not showing up correctly Jul 29, 2024
@azure-sdk
Copy link
Collaborator

azure-sdk commented Jul 29, 2024

All changed packages have been documented.

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

@typespec/compiler - fix ✏️

Fix type comparison of literal and scalar when in projection context

@typespec/openapi3 - fix ✏️

Fix issue where operation example would produce an empty object when @body/@bodyRoot was used

@typespec/openapi3 - fix ✏️

Fix operation response body examples showing up for each response.

@typespec/http - feature ✏️

API: Expose properties: HttpProperty[] on operation parameter and response which reference all the properties of interest(Body, statusCode, contentType, implicitBodyProperty, etc.)

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

Copy link
Member

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

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

Had a few minor comments but otherwise looks good!

timotheeguerin and others added 3 commits August 5, 2024 09:41
Co-authored-by: Christopher Radek <14189820+chrisradek@users.noreply.github.com>
@timotheeguerin timotheeguerin added this pull request to the merge queue Aug 5, 2024
Merged via the queue into microsoft:main with commit 7b5d263 Aug 5, 2024
22 checks passed
@timotheeguerin timotheeguerin deleted the fix/response-examples branch August 5, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:core Issues for @typespec/compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Operation example should resolve example for multiple responses correctly
3 participants