19 instantiations of ApiParameterDescription
Microsoft.AspNetCore.Grpc.Swagger (3)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (3)
115apiDescription.ParameterDescriptions.Add(new ApiParameterDescription 137apiDescription.ParameterDescriptions.Add(new ApiParameterDescription 157apiDescription.ParameterDescriptions.Add(new ApiParameterDescription
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
DefaultApiDescriptionProvider.cs (2)
288context.Results.Add(new ApiParameterDescription() 658return new ApiParameterDescription()
EndpointMetadataApiDescriptionProvider.cs (2)
143var parameterDescription = new ApiParameterDescription 188return new ApiParameterDescription
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (10)
DefaultApiDescriptionProviderTest.cs (10)
2022var description = new ApiParameterDescription { Source = BindingSource.Body, }; 2036var description = new ApiParameterDescription { Source = BindingSource.Body, }; 2050var description = new ApiParameterDescription 2071var description = new ApiParameterDescription 2093var description = new ApiParameterDescription 2111var description = new ApiParameterDescription(); 2125var description = new ApiParameterDescription(); 2148var description = new ApiParameterDescription 2172var description = new ApiParameterDescription 2195var description = new ApiParameterDescription
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
JsonPatchOperationsArrayProviderTests.cs (2)
20var jsonPatchParameterDescription = new ApiParameterDescription 25var stringParameterDescription = new ApiParameterDescription
152 references to ApiParameterDescription
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
62foreach (var parameter in description.ParameterDescriptions)
Microsoft.AspNetCore.Mvc.Abstractions (6)
ApiExplorer\ApiDescription.cs (3)
31/// Gets a list of <see cref="ApiParameterDescription"/> for this api. 33public IList<ApiParameterDescription> ParameterDescriptions { get; } = new List<ApiParameterDescription>();
ApiExplorer\ApiParameterRouteInfo.cs (3)
9/// A metadata description of routing information for an <see cref="ApiParameterDescription"/>. 18/// <see cref="ApiParameterDescription.Source"/> for the data source considered. 35/// <see cref="ApiParameterDescription.Source"/> then the value may also come from the
Microsoft.AspNetCore.Mvc.ApiExplorer (13)
ApiParameterContext.cs (2)
21Results = new List<ApiParameterDescription>(); 28public IList<ApiParameterDescription> Results { get; }
DefaultApiDescriptionProvider.cs (7)
113foreach (var parameter in GetParameters(parameterContext)) 133foreach (var parameter in apiDescription.ParameterDescriptions) 162private IList<ApiParameterDescription> GetParameters(ApiParameterContext context) 248var parameter = context.Results[i]; 299foreach (var parameter in context.Results) 327foreach (var parameter in context.Results) 653private ApiParameterDescription CreateResult(
EndpointMetadataApiDescriptionProvider.cs (3)
120var parameterDescription = CreateApiParameterDescription(parameter, routeEndpoint, disableInferredBody); 143var parameterDescription = new ApiParameterDescription 171private ApiParameterDescription? CreateApiParameterDescription(IParameterBindingMetadata parameter, RouteEndpoint routeEndpoint, bool disableInferredBody)
Properties\AssemblyInfo.cs (1)
9[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription))]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (106)
DefaultApiDescriptionProviderTest.cs (71)
184var parameter = Assert.Single(description.ParameterDescriptions); 230var parameter = Assert.Single(description.ParameterDescriptions); 296var parameter = Assert.Single(description.ParameterDescriptions); 312var parameterDescription = Assert.Single(description.ParameterDescriptions); 340var id = Assert.Single(parameters, p => p.Source == expected); 371var id = Assert.Single(parameters, p => p.Source == expected); 392var parameter = Assert.Single(description.ParameterDescriptions); 437var id1 = Assert.Single(description.ParameterDescriptions, p => p.Name == "id1"); 441var id2 = Assert.Single(description.ParameterDescriptions, p => p.Name == "id2"); 1326var parameter = Assert.Single(parameters, p => p.Name == "ProductId"); 1350var parameter = Assert.Single(description.ParameterDescriptions); 1370var parameter = Assert.Single(description.ParameterDescriptions); 1387var parameter = Assert.Single(description.ParameterDescriptions); 1404var parameter = Assert.Single(description.ParameterDescriptions); 1424var parameter = Assert.Single(parameters, p => p.Name == "ProductId"); 1454var parameter = Assert.Single(parameters); 1474var parameter = Assert.Single(description.ParameterDescriptions); 1506var parameter = Assert.Single(description.ParameterDescriptions); 1526var parameter = Assert.Single(parameters, p => p.Name == "ProductId"); 1553var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 1557var product = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product"); 1561var userId = Assert.Single(description.ParameterDescriptions, p => p.Name == "UserId"); 1565var comments = Assert.Single(description.ParameterDescriptions, p => p.Name == "Comments"); 1584var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Name"); 1603var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "id"); 1622var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "id"); 1641var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1660var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1679var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1698var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1717var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "managerid"); 1721var product = Assert.Single(description.ParameterDescriptions, p => p.Name == "name"); 1741var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 1745var product = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product"); 1749var userId = Assert.Single(description.ParameterDescriptions, p => p.Name == "UserId"); 1753var comments = Assert.Single(description.ParameterDescriptions, p => p.Name == "Comments"); 1772var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 1776var quantity = Assert.Single(description.ParameterDescriptions, p => p.Name == "Quantity"); 1780var productId = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product.Id"); 1784var price = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product.Price"); 1804var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 1808var quantity = Assert.Single(description.ParameterDescriptions, p => p.Name == "Quantity"); 1812var productId = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product.Id"); 1816var productPrice = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product.Price"); 1839var id = Assert.Single(description.ParameterDescriptions, p => p.Name == $"{parentName}.Child.Id"); 1843var name = Assert.Single(description.ParameterDescriptions, p => p.Name == $"{parentName}.Child.Name"); 1870var id = Assert.Single(description.ParameterDescriptions, p => p.Name == $"{groupName}.{parentName}.Child.Id"); 1874var name = Assert.Single(description.ParameterDescriptions, p => p.Name == $"{groupName}.{parentName}.Child.Name"); 1893var c = Assert.Single(description.ParameterDescriptions); 1911var products = Assert.Single(description.ParameterDescriptions); 1930var items = Assert.Single(description.ParameterDescriptions); 1952var id = Assert.Single(parameters, p => p.Name == "Id"); 1956var name = Assert.Single(parameters, p => p.Name == "Name"); 1974var name = Assert.Single(description.ParameterDescriptions, p => p.Name == "Name"); 1978var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 1997var name = Assert.Single(description.ParameterDescriptions, p => p.Name == "name"); 2001var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 2005var product = Assert.Single(description.ParameterDescriptions, p => p.Name == "Product"); 2009var userId = Assert.Single(description.ParameterDescriptions, p => p.Name == "UserId"); 2013var comments = Assert.Single(description.ParameterDescriptions, p => p.Name == "Comments"); 2022var description = new ApiParameterDescription { Source = BindingSource.Body, }; 2036var description = new ApiParameterDescription { Source = BindingSource.Body, }; 2050var description = new ApiParameterDescription 2071var description = new ApiParameterDescription 2093var description = new ApiParameterDescription 2111var description = new ApiParameterDescription(); 2125var description = new ApiParameterDescription(); 2148var description = new ApiParameterDescription 2172var description = new ApiParameterDescription 2195var description = new ApiParameterDescription 2212private static ApiParameterContext GetApiParameterContext(ApiParameterDescription description)
EndpointMetadataApiDescriptionProviderTest.cs (35)
112var apiParameterDescription = apiDescription.ParameterDescriptions[0]; 127var apiParameterDescription = apiDescription.ParameterDescriptions[0]; 421var param = Assert.Single(apiDescription.ParameterDescriptions); 436var param = Assert.Single(apiDescription.ParameterDescriptions); 450var param = Assert.Single(apiDescription.ParameterDescriptions); 464var param = Assert.Single(apiDescription.ParameterDescriptions); 485var param = Assert.Single(apiDescription.ParameterDescriptions); 506var param = Assert.Single(apiDescription.ParameterDescriptions); 520var param = Assert.Single(apiDescription.ParameterDescriptions); 534var param = Assert.Single(apiDescription.ParameterDescriptions); 556var param = Assert.Single(apiDescription.ParameterDescriptions); 571var param = Assert.Single(apiDescription.ParameterDescriptions); 597var param = Assert.Single(apiDescription.ParameterDescriptions); 613var param = Assert.Single(apiDescription.ParameterDescriptions); 623var fooParam = apiDescription.ParameterDescriptions[0]; 630var barParam = apiDescription.ParameterDescriptions[1]; 637var fromBodyParam = apiDescription.ParameterDescriptions[2]; 745var fooParam = apiDescription.ParameterDescriptions[0]; 751var barParam = apiDescription.ParameterDescriptions[1]; 790var fooParam = apiDescription.ParameterDescriptions[0]; 796var barParam = apiDescription.ParameterDescriptions[1]; 809var nameParam = apiDescription.ParameterDescriptions[0]; 1048var bodyParameterDescription = parameterDescriptions.Single(); 1107var bodyParameterDescription = parameterDescriptions.Single(); 1139var bodyParameterDescription = parameterDescriptions.Single(); 1171var bodyParameterDescription = parameterDescriptions.Single(); 1199var bodyParameterDescription = parameterDescriptions.Single(); 1228var bodyParameterDescription = parameterDescriptions.Single(); 1257var bodyParameterDescription = parameterDescriptions.Single(); 1294var fromFileParam0 = apiDescription0.ParameterDescriptions[0]; 1300var fromFileParam1 = apiDescription1.ParameterDescriptions[0]; 1312var param = Assert.Single(apiDescription.ParameterDescriptions); 1345var bodyParameterDescription = parameterDescriptions.Single(); 1417var parameter = Assert.Single(apiDescription.ParameterDescriptions); 1511var parameter = Assert.Single(apiDescription.ParameterDescriptions);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
JsonPatchOperationsArrayProvider.cs (1)
42foreach (var parameterDescription in result.ParameterDescriptions)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
JsonPatchOperationsArrayProviderTests.cs (2)
20var jsonPatchParameterDescription = new ApiParameterDescription 25var stringParameterDescription = new ApiParameterDescription
Microsoft.AspNetCore.OpenApi (23)
Extensions\ApiDescriptionExtensions.cs (7)
78/// Determines if the given <see cref="ApiParameterDescription" /> is a request body parameter. 80/// <param name="apiParameterDescription">The <see cref="ApiParameterDescription"/> to check. </param> 82public static bool IsRequestBodyParameter(this ApiParameterDescription apiParameterDescription) => 91/// <param name="formParameters">A list of <see cref="ApiParameterDescription"/> associated with the form parameters.</param> 93public static bool TryGetFormParameters(this ApiDescription apiDescription, out IEnumerable<ApiParameterDescription> formParameters) 103/// <param name="bodyParameter">The <see cref="ApiParameterDescription"/> associated with the body parameter.</param> 105public static bool TryGetBodyParameter(this ApiDescription apiDescription, [NotNullWhen(true)] out ApiParameterDescription? bodyParameter)
Extensions\JsonNodeSchemaExtensions.cs (2)
285/// <param name="parameterDescription">The <see cref="ApiParameterDescription"/> associated with the <see paramref="schema"/>.</param> 287internal static void ApplyParameterInfo(this JsonNode schema, ApiParameterDescription parameterDescription, JsonTypeInfo? jsonTypeInfo)
Services\OpenApiDocumentService.cs (12)
398foreach (var parameter in description.ParameterDescriptions) 425static bool ShouldIgnoreParameter(ApiParameterDescription parameter) 444private static bool IsRequired(ApiParameterDescription parameter) 454private static string? GetParameterDescriptionFromAttribute(ApiParameterDescription parameter) => 463if (description.TryGetBodyParameter(out var bodyParameter)) 480IEnumerable<ApiParameterDescription> formParameters, 521var description = parameter.Single(); 601foreach (var description in parameter) 609foreach (var description in parameter) 631ApiParameterDescription bodyParameter, 676/// This method will also check if no target type was resolved from the <see cref="ApiParameterDescription"/> 680private static Type GetTargetType(ApiDescription description, ApiParameterDescription parameter)
Services\Schemas\OpenApiSchemaService.cs (2)
129internal async Task<OpenApiSchema> GetOrCreateSchemaAsync(Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, bool captureSchemaByRef = false, CancellationToken cancellationToken = default) 149internal async Task ApplySchemaTransformersAsync(OpenApiSchema schema, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)