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