Skip to content

Fix: Shared route body should use anyOf instead of oneOf#2366

Merged
timotheeguerin merged 5 commits into
microsoft:mainfrom
timotheeguerin:fix/oneof
Sep 6, 2023
Merged

Fix: Shared route body should use anyOf instead of oneOf#2366
timotheeguerin merged 5 commits into
microsoft:mainfrom
timotheeguerin:fix/oneof

Conversation

@timotheeguerin

@timotheeguerin timotheeguerin commented Sep 5, 2023

Copy link
Copy Markdown
Member

fix #2303

We don't know if those bodies are mutually exclusive so anyOf is more correct.

@github-actions

github-actions Bot commented Sep 5, 2023

Copy link
Copy Markdown
Contributor

Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):
Playground: https://cadlplayground.z22.web.core.windows.net/prs/2366/

Website: https://cadlwebsite.z1.web.core.windows.net/prs/2366/

@daviwil daviwil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if this affects any samples on typespec-azure

@timotheeguerin

Copy link
Copy Markdown
Member Author

I wonder if this affects any samples on typespec-azure

might need to regen the samples for the openapi output but it shouldn't be a major change, I'll make a PR

@timotheeguerin
timotheeguerin enabled auto-merge (squash) September 6, 2023 15:39
@timotheeguerin
timotheeguerin merged commit f4a0488 into microsoft:main Sep 6, 2023
@timotheeguerin
timotheeguerin deleted the fix/oneof branch March 4, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OpenAPI3] Multiple responses with same status code should use anyOf instead of oneOf

2 participants