Respect LowercaseUrls
See original GitHub issueI added the following in my ConfigureServices section.
services.AddRouting(options =>
{
options.LowercaseUrls = true;
});
services.AddSwagger();
app.UseSwaggerUi3WithApiExplorer(settings =>
{
settings.GeneratorSettings.DefaultPropertyNameHandling = PropertyNameHandling.Default;
settings.GeneratorSettings.OperationProcessors.Add(new OperationSecurityScopeProcessor("Authorization"));
settings.GeneratorSettings.OperationProcessors.Add(new OperationSecurityScopeProcessor("ServiceAccount"));
settings.GeneratorSettings.DocumentProcessors.Add(
new SecurityDefinitionAppender("Authorization", new SwaggerSecurityScheme
{
Type = SwaggerSecuritySchemeType.ApiKey,
Name = "Authorization",
Description = "The identity token responsible for request.",
In = SwaggerSecurityApiKeyLocation.Header
}));
settings.GeneratorSettings.DocumentProcessors.Add(
new SecurityDefinitionAppender("ServiceAccount", new SwaggerSecurityScheme
{
Type = SwaggerSecuritySchemeType.ApiKey,
Name = "ServiceAccount",
Description = "The service account token responsible for request.",
In = SwaggerSecurityApiKeyLocation.Header
}));
});
The capitalization is not being respected in the SwaggerUI.
Similar to https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/74 on Swashbuckle Implementation.
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
asp.net mvc - Should my URLs be lowercase?
No, that's not necessary. Windows operating systems are case insensitive, including their server OS's and framework applications. Linux/Unix ...
Read more >URLs Case Sensitive - How to Redirect Uppercase to ... - Inflow
Are URLs case sensitive? Learn how to redirect uppercase URLs to lowercase using htaccess or httpd.conf to prevent 404 errors from occurring.
Read more >Outlook bug: URL paths/queries forced lowercase in tooltip
URLs in e-mails are getting their paths and queries to be forced lower-case URL host names are not case sensitive.
Read more >Respect the LowercaseUrls Routing Setting · Issue #74
LowercaseUrls `. I'd like to create an issue in the ASP.NET Core repo as I'd prefer to solve it at source rather than...
Read more >Cloudflare rules do not respect uppercase or lowercase ...
I have a problem with the Cloudflare rules, since I try to cache the html of the static content but the rule affects...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Filed https://github.com/aspnet/Mvc/issues/8006 to track addressing this in MVC.
Okay it turns out I was using
If this is false then it will not work. My First use of OData required me to use this but a video from here shows it isn’t needed so I’ve removed it since and the correct casing is now followed.
I think this can now be closed if
opt.EnableEndpointRouting = false;
is a known side effect.