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