RestAttribute

Ecng.Net

Specifies that the associated element is intended to be used in REST API operations. This attribute can be applied to methods, parameters, or return values.

Inherits: Attribute

Properties

Ignore
public bool Ignore { get; set; }
value = restAttribute.Ignore
restAttribute.Ignore = value

When , the parameter is excluded from the request wire shape (Object[]) filters it out of the params/args validation), but the C# signature still carries it. Canonical use-case: a parameter that the server resolves from auth context (JWT claim) rather than from the request body or URL — e.g. tenantId / userId on a server-shaped client interface.

IsRequired
public bool IsRequired { get; set; }
value = restAttribute.IsRequired
restAttribute.IsRequired = value

Gets or sets a value indicating whether the REST element is required.

Name
public string Name { get; set; }
value = restAttribute.Name
restAttribute.Name = value

Gets or sets the name associated with the REST entity.