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 don't emit shared route error when verb don't match #2948

Merged
merged 11 commits into from
Feb 28, 2024

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Feb 23, 2024

fix #2925

Stop emitting the error if there is a shared route and a non shared route on a different verb.

Also improve the error:

  • change message to be a little more clear
  • emit the error on every offending operation not just the first one we find an duplicate

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 23, 2024

All changed packages have been documented.

packages/http/src/lib.ts Outdated Show resolved Hide resolved
@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/2948/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/2948/

packages/http/src/lib.ts Outdated Show resolved Hide resolved
@timotheeguerin timotheeguerin enabled auto-merge (squash) February 28, 2024 21:06
@timotheeguerin timotheeguerin merged commit 9d8cfb0 into microsoft:main Feb 28, 2024
14 checks passed
@timotheeguerin timotheeguerin deleted the fix/shared-route-verb branch February 28, 2024 22:17
markcowl pushed a commit to markcowl/cadl that referenced this pull request Mar 8, 2024
fix [microsoft#2925](microsoft#2925)

Stop emitting the error if there is a shared route and a non shared
route on a different verb.

Also improve the error: 
- change message to be a little more clear
- emit the error on every offending operation not just the first one we
find an duplicate

---------

Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
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.

[OpenAPI 3] Spurious error on op with same path and different verb from a shared route
3 participants