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
HttpConfigurationThe configuration.
Properties
ApiDescriptions
Gets the API descriptions. The descriptions are initialized on the first access.
public Collection<ApiDescription> ApiDescriptions { get; }
Property Value
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
IHttpRouteThe route.
actionDescriptor
HttpActionDescriptorThe 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
stringThe action variable value from the route.
actionDescriptor
HttpActionDescriptorThe action descriptor.
route
IHttpRouteThe 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
stringThe controller variable value from the route.
controllerDescriptor
HttpControllerDescriptorThe controller descriptor.
route
IHttpRouteThe route.
Returns
- bool
true if the controller should be considered for ApiDescriptions generation, false otherwise.