Class ApiMemberAttribute
Inheritance
Inherited Members
Namespace: MediaBrowser.Model.Services
Assembly: MediaBrowser.Model.dll
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
public sealed class ApiMemberAttribute : Attribute
Properties
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.
Declaration
public bool AllowMultiple { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DataType
For path, query, and header paramTypes, this field must be a primitive. For body, this can be a complex or container datatype.
Declaration
public string DataType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Description
Gets or sets the human-readable description for the parameter.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ExcludeInSchema
Whether to exclude this property from being included in the ModelSchema
Declaration
[Obsolete("This is not used for API documentation and is otherwise unused as well.")]
public bool ExcludeInSchema { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsRequired
For path, this is always true. Otherwise, this field tells the client whether or not the field must be supplied.
Declaration
public bool IsRequired { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Other notes on the name field: If paramType is body, the name is used only for UI and codegeneration. If paramType is path, the name field must correspond to the associated path segment from the path field in the api object. If paramType is query, the name field corresponds to the query param name.
ParameterType
Gets or sets parameter type: It can be only one of the following: path, query, body, form, or header.
Declaration
public string ParameterType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Route
Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes.
Declaration
[Obsolete("This is not used for API documentation and is otherwise unused as well.")]
public string Route { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Verb
Gets or sets verb to which applies attribute. By default applies to all verbs.
Declaration
public string Verb { get; set; }
Property Value
Type | Description |
---|---|
System.String |