Table of Contents

Class ApiExplorer

Namespace
System.Web.Http.Description
Assembly
System.Web.Http.dll

Explores the URI space of the service based on routes, controllers and actions available in the system.

public class ApiExplorer : IApiExplorer
Inheritance
ApiExplorer
Implements
Inherited Members

Constructors

ApiExplorer(HttpConfiguration)

Initializes a new instance of the ApiExplorer class.

public ApiExplorer(HttpConfiguration configuration)

Parameters

configuration HttpConfiguration

The configuration.

Properties

ApiDescriptions

Gets the API descriptions. The descriptions are initialized on the first access.

public Collection<ApiDescription> ApiDescriptions { get; }

Property Value

Collection<ApiDescription>

DocumentationProvider

Gets or sets the documentation provider. The provider will be responsible for documenting the API.

public IDocumentationProvider DocumentationProvider { get; set; }

Property Value

IDocumentationProvider

The documentation provider.

Methods

GetHttpMethodsSupportedByAction(IHttpRoute, HttpActionDescriptor)

Gets a collection of HttpMethods supported by the action. Called when initializing the ApiDescriptions.

public virtual Collection<HttpMethod> GetHttpMethodsSupportedByAction(IHttpRoute route, HttpActionDescriptor actionDescriptor)

Parameters

route IHttpRoute

The route.

actionDescriptor HttpActionDescriptor

The action descriptor.

Returns

Collection<HttpMethod>

A collection of HttpMethods supported by the action.

ShouldExploreAction(string, HttpActionDescriptor, IHttpRoute)

Determines whether the action should be considered for ApiDescriptions generation. Called when initializing the ApiDescriptions.

public virtual bool ShouldExploreAction(string actionVariableValue, HttpActionDescriptor actionDescriptor, IHttpRoute route)

Parameters

actionVariableValue string

The action variable value from the route.

actionDescriptor HttpActionDescriptor

The action descriptor.

route IHttpRoute

The route.

Returns

bool

true if the action should be considered for ApiDescriptions generation, false otherwise.

ShouldExploreController(string, HttpControllerDescriptor, IHttpRoute)

Determines whether the controller should be considered for ApiDescriptions generation. Called when initializing the ApiDescriptions.

public virtual bool ShouldExploreController(string controllerVariableValue, HttpControllerDescriptor controllerDescriptor, IHttpRoute route)

Parameters

controllerVariableValue string

The controller variable value from the route.

controllerDescriptor HttpControllerDescriptor

The controller descriptor.

route IHttpRoute

The route.

Returns

bool

true if the controller should be considered for ApiDescriptions generation, false otherwise.