Share via


ApiParameterDescription.IsRequired Property

Definition

Gets or sets a value that determines if the parameter is required.

public:
 property bool IsRequired { bool get(); void set(bool value); };
public bool IsRequired { get; set; }
member this.IsRequired : bool with get, set
Public Property IsRequired As Boolean

Property Value

Remarks

A parameter is considered required if

  • it's bound from the request body (Body).
  • it's a required route value.
  • it has annotations (e.g. BindRequiredAttribute) that indicate it's required.

Applies to