Topic | Value |
---|---|
Id | ASP009 |
Severity | Warning |
Enabled | True |
Category | AspNetCoreAnalyzers.Routing |
Code | AttributeAnalyzer |
Use kebab-cased urls. Note that this is a breaking change.
[HttpGet(""api/TwoWords"")]
public IActionResult GetId()
{
...
}
[HttpGet(""api/two-words"")]
public IActionResult GetId()
{
...
}
Use kebab-cased urls.
Configure the severity per project, for more info see MSDN.
#pragma warning disable ASP009 // Use kebab-cased urls
Code violating the rule here
#pragma warning restore ASP009 // Use kebab-cased urls
Or put this at the top of the file to disable all instances.
#pragma warning disable ASP009 // Use kebab-cased urls
[System.Diagnostics.CodeAnalysis.SuppressMessage("AspNetCoreAnalyzers.Routing",
"ASP009:Use kebab-cased urls",
Justification = "Reason...")]