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