Skip to content

RouteCheck 0.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 17:48
· 2 commits to main since this release
dotnet tool update --global RouteCheck --version 0.3.0

Enhancements

  • RouteCheck now reports ambiguous routes: routes with the same method that match the same requests, e.g. GET /pets/{id} and GET /pets/{name}, which fail at runtime with an AmbiguousMatchException. They are listed below the routes, and as problems in --output json/markdown.
  • New --strict option to exit with code 2 if there are problems with the routes, e.g. in CI jobs.
  • New Auth column (and auth in --output json/markdown): who may request the route, e.g. Anonymous, Authenticated, Policy: Admin or Roles: admin, editor. It includes the fallback policy and global MVC AuthorizeFilters, and is left out if anyone may request every route.
  • New --anonymous option to show only the routes anyone may request.
  • New --verbose option to show more about each route: its name, tags, accepted content types and responses.
  • New -e|--environment option to run the web app in another environment than Development, e.g. -e Staging. It wins over the launch profile.
  • New -c|--configuration option to build and run another configuration than Debug, e.g. -c Release.
  • New --launch-profile option to run the web app with a launch profile of launchSettings.json.
  • New --no-build option to skip the build, e.g. in CI jobs that built the app already.
  • New --handler option to show only routes whose handler contains the given text or matches a wildcard pattern, e.g. --handler "OrdersController.*".
  • New -x|--exclude option to leave out routes whose path contains the given text or matches a wildcard pattern, e.g. -x "/_framework/*".
  • New --baseline option to compare the routes with a document written earlier with --output json, showing the added, removed and changed routes. With --strict, removed routes exit with code 2.
  • F# (*.fsproj) and Visual Basic (*.vbproj) projects are supported. Lambdas in F# are shown as Program (lambda) too.
  • RouteCheck can be run from a directory with a solution (*.sln or *.slnx), e.g. the root of a repository, and --path can be a solution. It uses the solution's web project.
  • Unexpected errors, e.g. when dotnet is not on the PATH, are reported like other errors, so --output json/markdown always print a document.

Bug fixes

  • Hosted services of the web app, e.g. a BackgroundService consuming a queue or sending emails, are no longer started. Before, they ran and did their work while RouteCheck read the routes.

Commits: v0.2.2...v0.3.0