// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using Microsoft.AspNet.Mvc.Actions; using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc.ApiExplorer { /// /// Represents an API exposed by this application. /// public class ApiDescription { /// /// Creates a new instance of . /// public ApiDescription() { Properties = new Dictionary(); ParameterDescriptions = new List(); SupportedResponseFormats = new List(); } /// /// The for this api. /// public ActionDescriptor ActionDescriptor { get; set; } /// /// The group name for this api. /// public string GroupName { get; set; } /// /// The supported HTTP method for this api, or null if all HTTP methods are supported. /// public string HttpMethod { get; set; } /// /// The list of for this api. /// public IList ParameterDescriptions { get; private set; } /// /// Stores arbitrary metadata properties associated with the . /// public IDictionary Properties { get; private set; } /// /// The relative url path template (relative to application root) for this api. /// public string RelativePath { get; set; } /// /// The for the or null. /// /// /// Will be null if is null. /// public ModelMetadata ResponseModelMetadata { get; set; } /// /// The CLR data type of the response or null. /// /// /// Will be null if the action returns no response, or if the response type is unclear. Use /// ProducesAttribute on an action method to specify a response type. /// public Type ResponseType { get; set; } /// /// A list of possible formats for a response. /// /// /// Will be empty if the action returns no response, or if the response type is unclear. Use /// ProducesAttribute on an action method to specify a response type. /// public IList SupportedResponseFormats { get; private set; } } }