16 writes to Source
Microsoft.AspNetCore.Grpc.Swagger (3)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (3)
119Source = BindingSource.Path, 141Source = BindingSource.Body, 161Source = BindingSource.Query,
Microsoft.AspNetCore.Mvc.ApiExplorer (5)
DefaultApiDescriptionProvider.cs (3)
264parameter.Source = BindingSource.Path; 292Source = BindingSource.Path, 662Source = source,
EndpointMetadataApiDescriptionProvider.cs (2)
147Source = BindingSource.Body, 192Source = source,
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (8)
DefaultApiDescriptionProviderTest.cs (8)
2022var description = new ApiParameterDescription { Source = BindingSource.Body, }; 2036var description = new ApiParameterDescription { Source = BindingSource.Body, }; 2052Source = BindingSource.Body, 2073Source = BindingSource.Query, 2095Source = BindingSource.Path, 2150Source = BindingSource.Path, 2174Source = BindingSource.Query, 2197Source = BindingSource.Query,
115 references to Source
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
67Source = parameter.Source.Id,
Microsoft.AspNetCore.Mvc.Abstractions (2)
ApiExplorer\ApiParameterRouteInfo.cs (2)
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)
DefaultApiDescriptionProvider.cs (11)
135if (parameter.Source == BindingSource.Body) 145else if (parameter.Source == BindingSource.FormFile) 218if (!context.Results[i].Source.IsFromRequest) 250if (parameter.Source == BindingSource.Path || 251parameter.Source == BindingSource.ModelBinding || 252parameter.Source == BindingSource.Custom) 259if (parameter.Source == BindingSource.ModelBinding && 269if (parameter.Source == BindingSource.Path && 301if (parameter.Source == BindingSource.Body) 318if (parameter.Source == BindingSource.Path && parameter.RouteInfo != null && !parameter.RouteInfo.IsOptional) 329if (parameter.Source == BindingSource.Path)
EndpointMetadataApiDescriptionProvider.cs (2)
127parameterDescription.Source == BindingSource.Body || 128parameterDescription.Source == BindingSource.FormFile;
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (89)
DefaultApiDescriptionProviderTest.cs (64)
185Assert.Equal(BindingSource.Path, parameter.Source); 231Assert.Equal(BindingSource.Path, parameter.Source); 297Assert.Equal(BindingSource.Path, parameter.Source); 340var id = Assert.Single(parameters, p => p.Source == expected); 371var id = Assert.Single(parameters, p => p.Source == expected); 438Assert.Equal(BindingSource.Path, id1.Source); 442Assert.Equal(BindingSource.Path, id2.Source); 1327Assert.Same(BindingSource.ModelBinding, parameter.Source); 1331Assert.Same(BindingSource.ModelBinding, parameter.Source); 1335Assert.Same(BindingSource.ModelBinding, parameter.Source); 1352Assert.Same(BindingSource.ModelBinding, parameter.Source); 1372Assert.Same(BindingSource.Path, parameter.Source); 1389Assert.Same(BindingSource.Query, parameter.Source); 1406Assert.Same(BindingSource.Body, parameter.Source); 1425Assert.Same(BindingSource.Form, parameter.Source); 1429Assert.Same(BindingSource.Form, parameter.Source); 1433Assert.Same(BindingSource.Form, parameter.Source); 1455Assert.Same(BindingSource.FormFile, parameter.Source); 1476Assert.Same(BindingSource.Header, parameter.Source); 1508Assert.Same(BindingSource.Custom, parameter.Source); 1527Assert.Same(BindingSource.ModelBinding, parameter.Source); 1531Assert.Same(BindingSource.ModelBinding, parameter.Source); 1535Assert.Same(BindingSource.ModelBinding, parameter.Source); 1554Assert.Same(BindingSource.Path, id.Source); 1558Assert.Same(BindingSource.Body, product.Source); 1562Assert.Same(BindingSource.Header, userId.Source); 1566Assert.Same(BindingSource.ModelBinding, comments.Source); 1585Assert.Same(BindingSource.Query, id.Source); 1604Assert.Same(BindingSource.Query, id.Source); 1623Assert.Same(BindingSource.Query, id.Source); 1642Assert.Same(BindingSource.Query, id.Source); 1661Assert.Same(BindingSource.Query, id.Source); 1680Assert.Same(BindingSource.Query, id.Source); 1699Assert.Same(BindingSource.Query, id.Source); 1718Assert.Same(BindingSource.Query, id.Source); 1722Assert.Same(BindingSource.Query, product.Source); 1742Assert.Same(BindingSource.Path, id.Source); 1746Assert.Same(BindingSource.Body, product.Source); 1750Assert.Same(BindingSource.Header, userId.Source); 1754Assert.Same(BindingSource.Query, comments.Source); 1773Assert.Same(BindingSource.Path, id.Source); 1777Assert.Same(BindingSource.ModelBinding, quantity.Source); 1781Assert.Same(BindingSource.ModelBinding, productId.Source); 1785Assert.Same(BindingSource.Query, price.Source); 1805Assert.Same(BindingSource.Path, id.Source); 1809Assert.Same(BindingSource.Query, quantity.Source); 1813Assert.Same(BindingSource.Query, productId.Source); 1817Assert.Same(BindingSource.Query, productPrice.Source); 1840Assert.Same(BindingSource.Query, id.Source); 1844Assert.Same(BindingSource.Query, name.Source); 1871Assert.Same(BindingSource.Query, id.Source); 1875Assert.Same(BindingSource.Query, name.Source); 1894Assert.Same(BindingSource.Query, c.Source); 1912Assert.Same(BindingSource.Query, products.Source); 1931Assert.Same(BindingSource.ModelBinding, items.Source); 1953Assert.Same(BindingSource.Query, id.Source); 1957Assert.Same(BindingSource.Query, name.Source); 1975Assert.Same(BindingSource.Header, name.Source); 1979Assert.Same(BindingSource.Form, id.Source); 1998Assert.Same(BindingSource.Query, name.Source); 2002Assert.Same(BindingSource.Path, id.Source); 2006Assert.Same(BindingSource.Body, product.Source); 2010Assert.Same(BindingSource.Header, userId.Source); 2014Assert.Same(BindingSource.ModelBinding, comments.Source);
EndpointMetadataApiDescriptionProviderTest.cs (25)
424Assert.Equal(BindingSource.Path, param.Source); 439Assert.Equal(BindingSource.Path, param.Source); 453Assert.Equal(BindingSource.Path, param.Source); 467Assert.Equal(BindingSource.Path, param.Source); 488Assert.Equal(BindingSource.Path, param.Source); 509Assert.Equal(BindingSource.Path, param.Source); 523Assert.Equal(BindingSource.Path, param.Source); 537Assert.Equal(BindingSource.Query, param.Source); 559Assert.Equal(BindingSource.Body, param.Source); 575Assert.Equal(BindingSource.Header, param.Source); 601Assert.Equal(BindingSource.Body, param.Source); 627Assert.Equal(BindingSource.Path, fooParam.Source); 634Assert.Equal(BindingSource.Query, barParam.Source); 641Assert.Equal(BindingSource.Body, fromBodyParam.Source); 657Assert.Equal(BindingSource.Path, param.Source); 664Assert.Equal(BindingSource.Query, param.Source); 672Assert.Equal(BindingSource.Body, param.Source); 748Assert.Equal(BindingSource.Path, fooParam.Source); 754Assert.Equal(BindingSource.Query, barParam.Source); 793Assert.Equal(BindingSource.Query, fooParam.Source); 799Assert.Equal(BindingSource.Query, barParam.Source); 812Assert.Equal(BindingSource.Query, nameParam.Source); 1297Assert.Equal(BindingSource.FormFile, fromFileParam0.Source); 1303Assert.Equal(BindingSource.FormFile, fromFileParam1.Source); 1315Assert.Equal(BindingSource.FormFile, param.Source);
Microsoft.AspNetCore.OpenApi (10)
Extensions\ApiDescriptionExtensions.cs (6)
83apiParameterDescription.Source == BindingSource.Body || 84apiParameterDescription.Source == BindingSource.FormFile || 85apiParameterDescription.Source == BindingSource.Form; 95formParameters = apiDescription.ParameterDescriptions.Where(parameter => parameter.Source == BindingSource.Form || parameter.Source == BindingSource.FormFile); 108var bodyParameters = apiDescription.ParameterDescriptions.Where(parameter => parameter.Source == BindingSource.Body);
Extensions\JsonNodeSchemaExtensions.cs (1)
337if (parameterDescription.Source is { } bindingSource && SupportsNullableProperty(bindingSource))
Services\OpenApiDocumentService.cs (3)
408In = parameter.Source.Id switch 433else if (parameter.Source == BindingSource.Header && _disallowedHeaderParameters.Contains(parameter.Name)) 450return parameter.Source == BindingSource.Path || parameter.IsRequired || hasRequiredAttribute;