7 writes to MediaType
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (1)
76
apiDescription.SupportedRequestFormats.Add(new ApiRequestFormat {
MediaType
= "application/json" });
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
DefaultApiDescriptionProvider.cs (2)
152
MediaType
= contentType,
443
MediaType
= supportedType,
EndpointMetadataApiDescriptionProvider.cs (1)
160
MediaType
= contentType
Microsoft.AspNetCore.OpenApi (3)
Services\OpenApiDocumentService.cs (3)
490
supportedRequestFormats = [new ApiRequestFormat {
MediaType
= "application/x-www-form-urlencoded" }];
642
supportedRequestFormats = [new ApiRequestFormat {
MediaType
= "application/octet-stream" }];
648
supportedRequestFormats = [new ApiRequestFormat {
MediaType
= "application/json" }];
30 references to MediaType
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
91
MediaType = request.
MediaType
,
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (27)
DefaultApiDescriptionProviderTest.cs (13)
1234
description.SupportedRequestFormats.OrderBy(f => f.
MediaType
.ToString()),
1235
f => Assert.Equal("application/json", f.
MediaType
.ToString()),
1236
f => Assert.Equal("application/xml", f.
MediaType
.ToString()),
1237
f => Assert.Equal("text/json", f.
MediaType
.ToString()),
1238
f => Assert.Equal("text/xml", f.
MediaType
.ToString()));
1258
description.SupportedRequestFormats.OrderBy(f => f.
MediaType
.ToString()),
1259
f => Assert.Equal("text/json", f.
MediaType
.ToString()),
1260
f => Assert.Equal("text/xml", f.
MediaType
.ToString()));
1276
description.SupportedRequestFormats.OrderBy(f => f.
MediaType
.ToString()),
1277
f => Assert.Equal("application/xml", f.
MediaType
.ToString()),
1278
f => Assert.Equal("text/xml", f.
MediaType
.ToString()));
1307
Assert.Equal("text/xml", format.
MediaType
.ToString());
1458
Assert.Equal("multipart/form-data", requestFormat.
MediaType
);
EndpointMetadataApiDescriptionProviderTest.cs (14)
68
Assert.Equal("application/custom", requestFormat.
MediaType
);
94
Assert.Equal("application/custom0", requestFormat0.
MediaType
);
98
Assert.Equal("application/custom1", requestFormat1.
MediaType
);
1017
Assert.Equal("application/json", requestType.
MediaType
);
1021
Assert.Equal("application/xml", requestType.
MediaType
);
1115
Assert.Equal("application/json", defaultRequestFormat.
MediaType
);
1147
Assert.Equal("application/json", defaultRequestFormat.
MediaType
);
1179
Assert.Equal("application/xml", defaultRequestFormat.
MediaType
);
1207
Assert.Equal("multipart/form-data", defaultRequestFormat.
MediaType
);
1236
Assert.Equal("multipart/form-data", defaultRequestFormat.
MediaType
);
1265
Assert.Equal("multipart/form-data", defaultRequestFormat.
MediaType
);
1278
Assert.Equal("application/custom0", requestFormat0.
MediaType
);
1282
Assert.Equal("application/custom1", requestFormat1.
MediaType
);
1352
Assert.Equal("multipart/form-data", defaultRequestFormat.
MediaType
);
Microsoft.AspNetCore.OpenApi (2)
Services\OpenApiDocumentService.cs (2)
619
var contentType = requestFormat.
MediaType
;
661
var contentType = requestForm.
MediaType
;