You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the ApiExplorer in AspNet Core a null reference exception is thrown if the API defines a parameter as part of a route, but does not have matching parameter on the controller method.
[HttpGet("foo/{unmatched}"]
public string GetFoo()
{
return "foo";
}
With no matching C# parameter on GetFoo() the ApiParameterDescription's ModelMetadata is null. A null coalescing operator should fix the problem.