6 writes to StatusCode
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (1)
84
StatusCode
= 200
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
ApiResponseTypeProvider.cs (3)
111
StatusCode
= StatusCodes.Status200OK,
174
StatusCode
= statusCode,
246
StatusCode
= statusCode,
EndpointMetadataApiDescriptionProvider.cs (1)
405
StatusCode
= 200,
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiDocumentService.cs (1)
51
private static readonly ApiResponseType _defaultApiResponseType = new() {
StatusCode
= StatusCodes.Status200OK };
116 references to StatusCode
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
99
StatusCode = response.
StatusCode
,
Microsoft.AspNetCore.Mvc.Abstractions (1)
ApiExplorer\ApiResponseType.cs (1)
50
/// If an <see cref="ApiDescription"/> has a default response, then the <see cref="
StatusCode
"/> property should be ignored. This response
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
ApiResponseTypeProvider.cs (2)
216
results[apiResponseType.
StatusCode
] = apiResponseType;
272
results[apiResponseType.
StatusCode
] = apiResponseType;
EndpointMetadataApiDescriptionProvider.cs (2)
378
if (!supportedResponseTypes.Any(existingResponseType => existingResponseType.
StatusCode
== apiResponseType.
StatusCode
))
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (108)
ApiResponseTypeProviderTest.cs (50)
36
result.OrderBy(r => r.
StatusCode
),
39
Assert.Equal(200, responseType.
StatusCode
);
52
Assert.Equal(301, responseType.
StatusCode
);
59
Assert.Equal(404, responseType.
StatusCode
);
101
result.OrderBy(r => r.
StatusCode
),
104
Assert.Equal(201, responseType.
StatusCode
);
117
Assert.Equal(400, responseType.
StatusCode
);
130
Assert.Equal(404, responseType.
StatusCode
);
159
result.OrderBy(r => r.
StatusCode
),
162
Assert.Equal(200, responseType.
StatusCode
);
175
Assert.Equal(400, responseType.
StatusCode
);
182
Assert.Equal(404, responseType.
StatusCode
);
210
result.OrderBy(r => r.
StatusCode
),
213
Assert.Equal(200, responseType.
StatusCode
);
249
result.OrderBy(r => r.
StatusCode
),
260
Assert.Equal(201, responseType.
StatusCode
);
269
Assert.Equal(404, responseType.
StatusCode
);
305
result.OrderBy(r => r.
StatusCode
),
308
Assert.Equal(201, responseType.
StatusCode
);
317
Assert.Equal(404, responseType.
StatusCode
);
348
result.OrderBy(r => r.
StatusCode
),
351
Assert.Equal(200, responseType.
StatusCode
);
359
Assert.Equal(404, responseType.
StatusCode
);
368
Assert.Equal(415, responseType.
StatusCode
);
400
result.OrderBy(r => r.
StatusCode
),
411
Assert.Equal(200, responseType.
StatusCode
);
443
result.OrderBy(r => r.
StatusCode
),
454
Assert.Equal(200, responseType.
StatusCode
);
462
Assert.Equal(415, responseType.
StatusCode
);
494
result.OrderBy(r => r.
StatusCode
),
497
Assert.Equal(201, responseType.
StatusCode
);
505
Assert.Equal(300, responseType.
StatusCode
);
511
Assert.Equal(500, responseType.
StatusCode
);
540
result.OrderBy(r => r.
StatusCode
),
549
Assert.Equal(400, responseType.
StatusCode
);
558
Assert.Equal(415, responseType.
StatusCode
);
586
result.OrderBy(r => r.
StatusCode
),
597
Assert.Equal(200, responseType.
StatusCode
);
606
Assert.Equal(400, responseType.
StatusCode
);
636
result.OrderBy(r => r.
StatusCode
),
639
Assert.Equal(200, responseType.
StatusCode
);
666
result.OrderBy(r => r.
StatusCode
),
669
Assert.Equal(200, responseType.
StatusCode
);
692
result.OrderBy(r => r.
StatusCode
),
695
Assert.Equal(200, responseType.
StatusCode
);
725
result.OrderBy(r => r.
StatusCode
),
729
Assert.Equal(200, responseType.
StatusCode
);
736
Assert.Equal(400, responseType.
StatusCode
);
742
Assert.Equal(404, responseType.
StatusCode
);
748
Assert.Equal(409, responseType.
StatusCode
);
DefaultApiDescriptionProviderTest.cs (27)
702
description.SupportedResponseTypes.OrderBy(responseType => responseType.
StatusCode
),
705
Assert.Equal(200, responseType.
StatusCode
);
712
Assert.Equal(304, responseType.
StatusCode
);
719
Assert.Equal(400, responseType.
StatusCode
);
726
Assert.Equal(500, responseType.
StatusCode
);
812
description.SupportedResponseTypes.OrderBy(responseType => responseType.
StatusCode
),
816
Assert.Equal(200, responseType.
StatusCode
);
823
Assert.Equal(400, responseType.
StatusCode
);
830
Assert.Equal(500, responseType.
StatusCode
);
875
description.SupportedResponseTypes.OrderBy(responseType => responseType.
StatusCode
),
879
Assert.Equal(200, responseType.
StatusCode
);
886
Assert.Equal(202, responseType.
StatusCode
);
893
Assert.Equal(400, responseType.
StatusCode
);
900
Assert.Equal(500, responseType.
StatusCode
);
945
description.SupportedResponseTypes.OrderBy(responseType => responseType.
StatusCode
),
949
Assert.Equal(201, responseType.
StatusCode
);
956
Assert.Equal(204, responseType.
StatusCode
);
963
Assert.Equal(400, responseType.
StatusCode
);
970
Assert.Equal(500, responseType.
StatusCode
);
1015
description.SupportedResponseTypes.OrderBy(responseType => responseType.
StatusCode
),
1019
Assert.Equal(200, responseType.
StatusCode
);
1026
Assert.Equal(201, responseType.
StatusCode
);
1033
Assert.Equal(400, responseType.
StatusCode
);
1040
Assert.Equal(500, responseType.
StatusCode
);
1062
Assert.Equal(200, responseType.
StatusCode
);
1087
Assert.Equal(204, responseType.
StatusCode
);
1126
Assert.Equal(200, responseTypes.
StatusCode
);
EndpointMetadataApiDescriptionProviderTest.cs (31)
138
Assert.Equal(200, responseType.
StatusCode
);
157
Assert.Equal(200, responseType.
StatusCode
);
172
Assert.Equal(200, responseType.
StatusCode
);
196
Assert.Equal(200, inferredResponseType.
StatusCode
);
204
Assert.Equal(201, annotatedResponseType.
StatusCode
);
223
Assert.Equal(200, rdfInferredResponseType.
StatusCode
);
232
Assert.Equal(201, createdResponseType.
StatusCode
);
241
Assert.Equal(400, badRequestResponseType.
StatusCode
);
261
Assert.Equal(201, createdResponseType.
StatusCode
);
270
Assert.Equal(400, badRequestResponseType.
StatusCode
);
287
Assert.Equal(201, createdResponseType.
StatusCode
);
296
Assert.Equal(400, badRequestResponseType.
StatusCode
);
312
Assert.Equal(201, createdResponseType.
StatusCode
);
330
Assert.Equal(200, responseType.
StatusCode
);
345
Assert.Equal(201, createdResponseType.
StatusCode
);
366
Assert.Equal(201, createdResponseType.
StatusCode
);
375
Assert.Equal(400, badRequestResponseType.
StatusCode
);
400
Assert.Equal(201, createdResponseType.
StatusCode
);
409
Assert.Equal(400, badRequestResponseType.
StatusCode
);
850
Assert.Contains(apiDescription.SupportedResponseTypes, m => m is {
StatusCode
: 400, Type: { } type } && type == typeof(ProblemDetails));
851
Assert.Contains(apiDescription.SupportedResponseTypes, m => m is {
StatusCode
: 200, Type: { } type } && type == typeof(string));
927
context.Results.SelectMany(r => r.SupportedResponseTypes).OrderBy(r => r.
StatusCode
),
931
Assert.Equal(200, responseType.
StatusCode
);
937
Assert.Equal(400, responseType.
StatusCode
);
943
Assert.Equal(404, responseType.
StatusCode
);
949
Assert.Equal(409, responseType.
StatusCode
);
977
context.Results.SelectMany(r => r.SupportedResponseTypes).OrderBy(r => r.
StatusCode
),
981
Assert.Equal(200, responseType.
StatusCode
);
987
Assert.Equal(201, responseType.
StatusCode
);
1077
context.Results.SelectMany(r => r.SupportedResponseTypes).OrderBy(r => r.
StatusCode
),
1081
Assert.Equal(200, responseType.
StatusCode
);
Microsoft.AspNetCore.OpenApi (2)
Services\OpenApiDocumentService.cs (2)
345
: responseType.
StatusCode
.ToString(CultureInfo.InvariantCulture);
346
responses.Add(responseKey, await GetResponseAsync(description, responseType.
StatusCode
, responseType, scopedServiceProvider, schemaTransformers, cancellationToken));