ApiParameterRouteInfo.IsOptional Property

Definition

Gets a value indicating whether not a parameter is considered optional by routing.

public bool IsOptional { get; set; }

Property Value

Remarks

An optional parameter is considered optional by the routing system. This does not imply that the parameter is considered optional by the action.

If the parameter uses ModelBinding for the value of Source then the value may also come from the URL query string or form data.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0