Skip to main content

ApiMemberAttribute

Document a short description for an API Property

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class ApiMemberAttribute : AttributeBase, _Attribute

Properties

Verb

Gets or sets verb to which applies attribute. By default applies to all verbs.

View Source
Declaration
public string Verb { get; set; }

ParameterType

Gets or sets parameter type: It can be only one of the following: path, query, body, form, or header.

View Source
Declaration
public string ParameterType { get; set; }

Name

Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values.

View Source
Declaration
public string Name { get; set; }

Description

Gets or sets the human-readable description for the parameter.

View Source
Declaration
public string Description { get; set; }

DataType

For path, query, and header paramTypes, this field must be a primitive. For body, this can be a complex or container datatype.

View Source
Declaration
public string DataType { get; set; }

Format

Fine-tuned primitive type definition.

View Source
Declaration
public string Format { get; set; }

IsRequired

For path, this is always true. Otherwise, this field tells the client whether or not the field must be supplied.

View Source
Declaration
public bool IsRequired { get; set; }

AllowMultiple

For query params, this specifies that a comma-separated list of values can be passed to the API. For path and body types, this field cannot be true.

View Source
Declaration
public bool AllowMultiple { get; set; }

Route

Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes.

View Source
Declaration
public string Route { get; set; }

ExcludeInSchema

Whether to exclude this property from being included in the ModelSchema

View Source
Declaration
public bool ExcludeInSchema { get; set; }

Implements

  • System.Runtime.InteropServices._Attribute