156 references to ParameterDescriptions
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
62foreach (var parameter in description.ParameterDescriptions)
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 (5)
DefaultApiDescriptionProvider.cs (3)
115apiDescription.ParameterDescriptions.Add(parameter); 126if (apiDescription.ParameterDescriptions.Count > 0) 133foreach (var parameter in apiDescription.ParameterDescriptions)
EndpointMetadataApiDescriptionProvider.cs (2)
124apiDescription.ParameterDescriptions.Add(parameterDescription); 151apiDescription.ParameterDescriptions.Add(parameterDescription);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (140)
DefaultApiDescriptionProviderTest.cs (81)
184var parameter = Assert.Single(description.ParameterDescriptions); 230var parameter = Assert.Single(description.ParameterDescriptions); 267Assert.Empty(description.ParameterDescriptions); 296var parameter = Assert.Single(description.ParameterDescriptions); 312var parameterDescription = Assert.Single(description.ParameterDescriptions); 338var parameters = description.ParameterDescriptions; 369var parameters = description.ParameterDescriptions; 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"); 462Assert.Single(description.ParameterDescriptions, p => p.Name == "id1"); 463Assert.Single(description.ParameterDescriptions, p => p.Name == "id2"); 464Assert.Single(description.ParameterDescriptions, p => p.Name == "id3"); 465Assert.Single(description.ParameterDescriptions, p => p.Name == "id4"); 466Assert.Single(description.ParameterDescriptions, p => p.Name == "id5"); 1323var parameters = description.ParameterDescriptions; 1350var parameter = Assert.Single(description.ParameterDescriptions); 1370var parameter = Assert.Single(description.ParameterDescriptions); 1387var parameter = Assert.Single(description.ParameterDescriptions); 1404var parameter = Assert.Single(description.ParameterDescriptions); 1421var parameters = description.ParameterDescriptions; 1453var parameters = description.ParameterDescriptions; 1474var parameter = Assert.Single(description.ParameterDescriptions); 1491Assert.Empty(description.ParameterDescriptions); 1506var parameter = Assert.Single(description.ParameterDescriptions); 1523var parameters = description.ParameterDescriptions; 1551Assert.Equal(4, description.ParameterDescriptions.Count); 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"); 1582Assert.Single(description.ParameterDescriptions); 1584var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Name"); 1601Assert.Single(description.ParameterDescriptions); 1603var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "id"); 1620Assert.Single(description.ParameterDescriptions); 1622var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "id"); 1639Assert.Single(description.ParameterDescriptions); 1641var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1658Assert.Single(description.ParameterDescriptions); 1660var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1677Assert.Single(description.ParameterDescriptions); 1679var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1696Assert.Single(description.ParameterDescriptions); 1698var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "employee"); 1715Assert.Equal(2, description.ParameterDescriptions.Count); 1717var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "managerid"); 1721var product = Assert.Single(description.ParameterDescriptions, p => p.Name == "name"); 1739Assert.Equal(4, description.ParameterDescriptions.Count); 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"); 1770Assert.Equal(4, description.ParameterDescriptions.Count); 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"); 1802Assert.Equal(4, description.ParameterDescriptions.Count); 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"); 1833Assert.Equal(4, description.ParameterDescriptions.Count); 1839var id = Assert.Single(description.ParameterDescriptions, p => p.Name == $"{parentName}.Child.Id"); 1843var name = Assert.Single(description.ParameterDescriptions, p => p.Name == $"{parentName}.Child.Name"); 1861Assert.Equal(8, description.ParameterDescriptions.Count); 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); 1949var parameters = description.ParameterDescriptions; 1974var name = Assert.Single(description.ParameterDescriptions, p => p.Name == "Name"); 1978var id = Assert.Single(description.ParameterDescriptions, p => p.Name == "Id"); 1995Assert.Equal(5, description.ParameterDescriptions.Count); 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");
EndpointMetadataApiDescriptionProviderTest.cs (59)
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); 581Assert.Empty(GetApiDescription((IInferredServiceInterface foo) => { }).ParameterDescriptions); 582Assert.Empty(GetApiDescription(([FromServices] InferredServiceClass foo) => { }).ParameterDescriptions); 583Assert.Empty(GetApiDescription(([FromKeyedServices("foo")] InferredServiceClass foo) => { }).ParameterDescriptions); 584Assert.Empty(GetApiDescription((HttpContext context) => { }).ParameterDescriptions); 585Assert.Empty(GetApiDescription((HttpRequest request) => { }).ParameterDescriptions); 586Assert.Empty(GetApiDescription((HttpResponse response) => { }).ParameterDescriptions); 587Assert.Empty(GetApiDescription((ClaimsPrincipal user) => { }).ParameterDescriptions); 588Assert.Empty(GetApiDescription((CancellationToken token) => { }).ParameterDescriptions); 589Assert.Empty(GetApiDescription((BindAsyncRecord context) => { }).ParameterDescriptions); 597var param = Assert.Single(apiDescription.ParameterDescriptions); 613var param = Assert.Single(apiDescription.ParameterDescriptions); 621Assert.Equal(3, apiDescription.ParameterDescriptions.Count); 623var fooParam = apiDescription.ParameterDescriptions[0]; 630var barParam = apiDescription.ParameterDescriptions[1]; 637var fromBodyParam = apiDescription.ParameterDescriptions[2]; 652apiDescription.ParameterDescriptions, 701Assert.Equal(4, apiDescription.ParameterDescriptions.Count); 703Assert.Collection(apiDescription.ParameterDescriptions, 714Assert.Equal(4, apiDescription.ParameterDescriptions.Count); 716Assert.NotNull(apiDescription.ParameterDescriptions[0].ModelMetadata.ContainerType); 717Assert.Equal(typeof(AsParametersWithRequiredMembers), apiDescription.ParameterDescriptions[0].ModelMetadata.ContainerType); 731Assert.Equal(2, apiDescription.ParameterDescriptions.Count); 733Assert.Collection(apiDescription.ParameterDescriptions, 743Assert.Equal(2, apiDescription.ParameterDescriptions.Count); 745var fooParam = apiDescription.ParameterDescriptions[0]; 751var barParam = apiDescription.ParameterDescriptions[1]; 788Assert.Equal(2, apiDescription.ParameterDescriptions.Count); 790var fooParam = apiDescription.ParameterDescriptions[0]; 796var barParam = apiDescription.ParameterDescriptions[1]; 807Assert.Single(apiDescription.ParameterDescriptions); 809var nameParam = apiDescription.ParameterDescriptions[0]; 1047var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1106var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1138var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1170var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1198var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1227var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1256var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1291Assert.Single(apiDescription0.ParameterDescriptions); 1292Assert.Single(apiDescription1.ParameterDescriptions); 1294var fromFileParam0 = apiDescription0.ParameterDescriptions[0]; 1300var fromFileParam1 = apiDescription1.ParameterDescriptions[0]; 1312var param = Assert.Single(apiDescription.ParameterDescriptions); 1344var parameterDescriptions = context.Results.SelectMany(r => r.ParameterDescriptions); 1381Assert.Collection(apiDescription.ParameterDescriptions, 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 (3)
JsonPatchOperationsArrayProviderTests.cs (3)
31apiDescription.ParameterDescriptions.Add(jsonPatchParameterDescription); 32apiDescription.ParameterDescriptions.Add(stringParameterDescription); 42Assert.Collection(apiDescription.ParameterDescriptions,
Microsoft.AspNetCore.OpenApi (3)
Extensions\ApiDescriptionExtensions.cs (2)
95formParameters = apiDescription.ParameterDescriptions.Where(parameter => parameter.Source == BindingSource.Form || parameter.Source == BindingSource.FormFile); 108var bodyParameters = apiDescription.ParameterDescriptions.Where(parameter => parameter.Source == BindingSource.Body);
Services\OpenApiDocumentService.cs (1)
398foreach (var parameter in description.ParameterDescriptions)