Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.6 KB

ASP003.md

File metadata and controls

50 lines (36 loc) · 1.6 KB

ASP003

Parameter type does not match the type specified by the name specified by the route parameter

Topic Value
Id ASP003
Severity Warning
Enabled True
Category AspNetCoreAnalyzers.Routing
Code AttributeAnalyzer

Description

Parameter type does not match the type specified by the name specified by the route parameter.

Motivation

ADD MOTIVATION HERE

How to fix violations

ADD HOW TO FIX VIOLATIONS HERE

Configure severity

Via ruleset file.

Configure the severity per project, for more info see MSDN.

Via #pragma directive.

#pragma warning disable ASP003 // Parameter type does not match the type specified by the name specified by the route parameter
Code violating the rule here
#pragma warning restore ASP003 // Parameter type does not match the type specified by the name specified by the route parameter

Or put this at the top of the file to disable all instances.

#pragma warning disable ASP003 // Parameter type does not match the type specified by the name specified by the route parameter

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("AspNetCoreAnalyzers.Routing", 
    "ASP003:Parameter type does not match the type specified by the name specified by the route parameter", 
    Justification = "Reason...")]