2 writes to ApiResponseFormats
Microsoft.AspNetCore.Grpc.Swagger (2)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (2)
82ApiResponseFormats = { new ApiResponseFormat { MediaType = "application/json" } }, 88ApiResponseFormats = { new ApiResponseFormat { MediaType = "application/json" } },
72 references to ApiResponseFormats
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
104foreach (var responseFormat in response.ApiResponseFormats)
Microsoft.AspNetCore.Mvc.Abstractions (1)
ApiExplorer\ApiResponseType.cs (1)
9/// Possible type of the response body which is formatted by <see cref="ApiResponseFormats"/>.
Microsoft.AspNetCore.Mvc.ApiExplorer (9)
ApiResponseTypeProvider.cs (3)
285if (apiResponse.ApiResponseFormats.Count > 0) 327apiResponse.ApiResponseFormats.Add(new ApiResponseFormat 339apiResponse.ApiResponseFormats.Add(new ApiResponseFormat
EndpointMetadataApiDescriptionProvider.cs (6)
369AddResponseContentTypes(apiResponseType.ApiResponseFormats, contentTypes); 373else if (apiResponseType.ApiResponseFormats.Count == 0 && CreateDefaultApiResponseFormat(apiResponseType.Type) is { } defaultResponseFormat) 375apiResponseType.ApiResponseFormats.Add(defaultResponseFormat); 392defaultApiResponseType.ApiResponseFormats.Clear(); 393AddResponseContentTypes(defaultApiResponseType.ApiResponseFormats, contentTypes); 411apiResponseType.ApiResponseFormats.Add(responseFormat);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (60)
ApiResponseTypeProviderTest.cs (36)
43responseType.ApiResponseFormats, 55Assert.Empty(responseType.ApiResponseFormats); 62Assert.Empty(responseType.ApiResponseFormats); 108responseType.ApiResponseFormats, 121responseType.ApiResponseFormats, 133Assert.Empty(responseType.ApiResponseFormats); 166responseType.ApiResponseFormats, 178Assert.Empty(responseType.ApiResponseFormats); 185Assert.Empty(responseType.ApiResponseFormats); 217responseType.ApiResponseFormats, 255responseType.ApiResponseFormats, 264responseType.ApiResponseFormats, 272Assert.Empty(responseType.ApiResponseFormats); 312responseType.ApiResponseFormats, 320Assert.Empty(responseType.ApiResponseFormats); 354responseType.ApiResponseFormats, 363responseType.ApiResponseFormats, 372responseType.ApiResponseFormats, 406responseType.ApiResponseFormats, 414responseType.ApiResponseFormats, 449responseType.ApiResponseFormats, 457responseType.ApiResponseFormats, 466responseType.ApiResponseFormats, 500responseType.ApiResponseFormats, 507Assert.Empty(responseType.ApiResponseFormats); 513Assert.Empty(responseType.ApiResponseFormats); 545Assert.Empty(responseType.ApiResponseFormats); 553responseType.ApiResponseFormats, 561Assert.Empty(responseType.ApiResponseFormats); 592responseType.ApiResponseFormats, 601responseType.ApiResponseFormats, 610responseType.ApiResponseFormats, 643responseType.ApiResponseFormats, 673responseType.ApiResponseFormats, 699responseType.ApiResponseFormats, 779return apiResponseType.ApiResponseFormats
DefaultApiDescriptionProviderTest.cs (5)
715Assert.Empty(responseType.ApiResponseFormats); 818Assert.Empty(responseType.ApiResponseFormats); 1130foreach (var responseFormat in responseTypes.ApiResponseFormats) 1204responseType.ApiResponseFormats.Where(responseFormat => responseFormat.MediaType == "text/json")); 2347return apiResponseType.ApiResponseFormats
EndpointMetadataApiDescriptionProviderTest.cs (19)
142var responseFormat = Assert.Single(responseType.ApiResponseFormats); 161var responseFormat = Assert.Single(responseType.ApiResponseFormats); 176Assert.Empty(responseType.ApiResponseFormats); 200Assert.Equal(["application/json", "application/custom"], inferredResponseType.ApiResponseFormats.Select(f => f.MediaType)); 208Assert.Equal("application/custom", Assert.Single(annotatedResponseType.ApiResponseFormats).MediaType); 227var rdfInferredResponseFormat = Assert.Single(rdfInferredResponseType.ApiResponseFormats); 236var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 245var badRequestResponseFormat = Assert.Single(badRequestResponseType.ApiResponseFormats); 265var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 274Assert.Empty(badRequestResponseType.ApiResponseFormats); 291var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 300Assert.Empty(badRequestResponseType.ApiResponseFormats); 316var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 349var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 370var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 379Assert.Empty(badRequestResponseType.ApiResponseFormats); 404var createdResponseFormat = Assert.Single(createdResponseType.ApiResponseFormats); 413Assert.Empty(badRequestResponseType.ApiResponseFormats); 1518return apiResponseType.ApiResponseFormats
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiDocumentService.cs (1)
369var apiResponseFormatContentTypes = apiResponseType.ApiResponseFormats