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