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

Improve logic of no-routes rule #2673

Merged
merged 4 commits into from
Nov 16, 2023
Merged

Conversation

tjprescott
Copy link
Member

@tjprescott tjprescott commented Nov 15, 2023

Fix #2573.

Playground shows that:

  • the warning now appears on any namespace that has operations if none have @service
  • does not appear when there are operations in the global namespace
  • disappears from all namespaces when @service is placed on any namespace that has operations

Copy link
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/2673/

Website: https://tspwebsitepr.z22.web.core.windows.net/prs/2673/

@tjprescott tjprescott marked this pull request as ready for review November 16, 2023 16:50
Copy link
Member

@timotheeguerin timotheeguerin left a comment

Choose a reason for hiding this comment

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

Just one little nit on the function

@tjprescott tjprescott enabled auto-merge (squash) November 16, 2023 21:37
@tjprescott tjprescott merged commit 324fdc3 into microsoft:main Nov 16, 2023
10 checks passed
@tjprescott tjprescott deleted the http/FixNoRoutes branch November 16, 2023 21:57
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.

Provide a suppression mechanism for @typespec/http/no-routes
3 participants