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

Endpoints Explorer only recognizes literal route strings #30293

Closed
johnholliday opened this issue Sep 9, 2023 · 5 comments · Fixed by #30301
Closed

Endpoints Explorer only recognizes literal route strings #30293

johnholliday opened this issue Sep 9, 2023 · 5 comments · Fixed by #30301
Labels
needs-more-info Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@johnholliday
Copy link

The Endpoints Explorer window only recognizes literal strings for routes. For example, the following declaration shows up in the Endpoints Explorer window:

public static class MyEndpoints {
  public static void MapMyEndpoints(this IEndpointRouteBuilder routes) {
    var group = routes.MapGroup("api/test");
    group.MapGet("/{id}", TestGetMethod);
}}

However, the following is invisible to the Endpoints Explorer window:

public static class MyEndpoints {
  private const string ApiBase = "api/Test";
  public static void MapMyEndpoints(this IEndpointRouteBuilder routes) {
    var group = routes.MapGroup(ApiBase);
    group.MapGet($"{ApiBase}/{id}", TestGetMethod);
}}

This can be a significant limitation, since it forces the declaration literal route strings that may be spread across many solution files, and other projects that may consume the API.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added ⌚ Not Triaged Source - Docs.ms Docs Customer feedback via GitHub Issue labels Sep 9, 2023
@Rick-Anderson
Copy link
Contributor

That's not a documentation issue. You should open this issue at https://developercommunity.visualstudio.com/VisualStudio

@johnholliday
Copy link
Author

johnholliday commented Sep 9, 2023 via email

@guardrex
Copy link
Collaborator

guardrex commented Sep 9, 2023

We have no way to version such content, and we have no way to track the fix for it because it would be internal to the VS team. I agree with Rick. I think problems with VS features generally need to go to that team for resolution.

@guardrex
Copy link
Collaborator

guardrex commented Sep 9, 2023

btw @johnholliday ... I recommend the Report a Problem feature in VS. I don't think those community issues generate bug reports ... directly anyway ... guessing 😄.

https://learn.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022

Rick-Anderson added a commit that referenced this issue Sep 11, 2023
@Rick-Anderson
Copy link
Contributor

@johnholliday please post links here where you have reported the issue.

Rick-Anderson added a commit that referenced this issue Sep 11, 2023
Rick-Anderson added a commit that referenced this issue Sep 11, 2023
* secure swag (#30299)

* logging with dot on linux /7 (#30298)

* logging with dot on linux /7

* logging with dot on linux /7

* Update http-files.md (#30301)

Fixes #30293

---------

Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants