158 references to ProducesResponseType
ApiExplorerWebSite (5)
Controllers\ApiExplorerResponseTypeWithApiConventionController.cs (4)
24[ProducesResponseType(202)] 25[ProducesResponseType(403)] 48[ProducesResponseType(302)] 49[ProducesResponseType(409)]
Controllers\ApiExplorerSystemVoid.cs (1)
16[ProducesResponseType(401)]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (44)
ApiResponseTypeProviderTest.cs (32)
25new ProducesResponseTypeAttribute(201), 26new ProducesResponseTypeAttribute(404), 70[ProducesResponseType(301)] 71[ProducesResponseType(404)] 81new FilterDescriptor(new ProducesResponseTypeAttribute(400), FilterScope.Global), 85new FilterDescriptor(new ProducesResponseTypeAttribute(404), FilterScope.Action), 147new ProducesResponseTypeAttribute(200), 148new ProducesResponseTypeAttribute(400), 149new ProducesResponseTypeAttribute(404), 237new ProducesResponseTypeAttribute(201), 238new ProducesResponseTypeAttribute(404), 279[ProducesResponseType(201)] 280[ProducesResponseType(404)] 293new ProducesResponseTypeAttribute(200), 294new ProducesResponseTypeAttribute(404), 334new ProducesResponseTypeAttribute(200), 335new ProducesResponseTypeAttribute(404), 336new ProducesResponseTypeAttribute(415), 387new ProducesResponseTypeAttribute(200), 429new ProducesResponseTypeAttribute(200), 480new ProducesResponseTypeAttribute(201), 481new ProducesResponseTypeAttribute(300), 482new ProducesResponseTypeAttribute(500), 527new ProducesResponseTypeAttribute(415), 573new ProducesResponseTypeAttribute(200), 574new ProducesResponseTypeAttribute(400), 623new ProducesResponseTypeAttribute(200), 624new ProducesResponseTypeAttribute(400), 655new ProducesResponseTypeAttribute(200), 716actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(409), FilterScope.Action)); 828[ProducesResponseType(206)] 829[ProducesResponseType(406)]
DefaultApiDescriptionProviderTest.cs (8)
646new ProducesResponseTypeAttribute(304), 746new ProducesResponseTypeAttribute(200), 853new ProducesResponseTypeAttribute(200), 856new ProducesResponseTypeAttribute(202), 923new ProducesResponseTypeAttribute(201), 926new ProducesResponseTypeAttribute(204), 993new ProducesResponseTypeAttribute(200), 996new ProducesResponseTypeAttribute(201),
EndpointMetadataApiDescriptionProviderTest.cs (4)
216[ProducesResponseType(StatusCodes.Status400BadRequest)] 254[ProducesResponseType(StatusCodes.Status400BadRequest)] 359[ProducesResponseType(StatusCodes.Status400BadRequest)] 387[ProducesResponseType(StatusCodes.Status400BadRequest)]
Microsoft.AspNetCore.Mvc.Core (20)
DefaultApiConventions.cs (20)
19[ProducesResponseType(StatusCodes.Status200OK)] 20[ProducesResponseType(StatusCodes.Status404NotFound)] 33[ProducesResponseType(StatusCodes.Status200OK)] 34[ProducesResponseType(StatusCodes.Status404NotFound)] 49[ProducesResponseType(StatusCodes.Status201Created)] 50[ProducesResponseType(StatusCodes.Status400BadRequest)] 63[ProducesResponseType(StatusCodes.Status201Created)] 64[ProducesResponseType(StatusCodes.Status400BadRequest)] 80[ProducesResponseType(StatusCodes.Status204NoContent)] 81[ProducesResponseType(StatusCodes.Status404NotFound)] 82[ProducesResponseType(StatusCodes.Status400BadRequest)] 100[ProducesResponseType(StatusCodes.Status204NoContent)] 101[ProducesResponseType(StatusCodes.Status404NotFound)] 102[ProducesResponseType(StatusCodes.Status400BadRequest)] 120[ProducesResponseType(StatusCodes.Status204NoContent)] 121[ProducesResponseType(StatusCodes.Status404NotFound)] 122[ProducesResponseType(StatusCodes.Status400BadRequest)] 141[ProducesResponseType(StatusCodes.Status200OK)] 142[ProducesResponseType(StatusCodes.Status404NotFound)] 143[ProducesResponseType(StatusCodes.Status400BadRequest)]
Microsoft.AspNetCore.Mvc.Core.Test (10)
ApiConventionTypeAttributeTest.cs (1)
72[ProducesResponseType(400)]
ApiExplorer\ApiConventionMatcherTest.cs (4)
448var attributes = new object[] { new CLSCompliantAttribute(false), new ProducesResponseTypeAttribute(200) }; 467new ProducesResponseTypeAttribute(200) } 498var attributes = new object[] { new CLSCompliantAttribute(false), new ProducesResponseTypeAttribute(200) }; 517new ProducesResponseTypeAttribute(200) }
ApiExplorer\ApiConventionResultTest.cs (5)
54[ProducesResponseType(200)] 55[ProducesResponseType(202)] 56[ProducesResponseType(404)] 59[ProducesResponseType(201)] 60[ProducesResponseType(403)]
Microsoft.AspNetCore.OpenApi.Tests (15)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (3)
20[ProducesResponseType(StatusCodes.Status400BadRequest)] 320[ProducesResponseType(StatusCodes.Status400BadRequest, Description = expectedBadRequestDescription)] 351[ProducesResponseType(StatusCodes.Status400BadRequest)] // Omitted, meaning it should be NULL
Services\OpenApiGeneratorTests.cs (12)
201[ProducesResponseType(StatusCodes.Status400BadRequest)] 226[ProducesResponseType(StatusCodes.Status400BadRequest)] 248[ProducesResponseType(StatusCodes.Status400BadRequest)] 264[ProducesResponseType(StatusCodes.Status100Continue)] 265[ProducesResponseType(StatusCodes.Status101SwitchingProtocols)] 281[ProducesResponseType(StatusCodes.Status100Continue)] 283[ProducesResponseType(StatusCodes.Status300MultipleChoices)] 284[ProducesResponseType(StatusCodes.Status400BadRequest)] 285[ProducesResponseType(StatusCodes.Status500InternalServerError)] 310[ProducesResponseType(46)] 311[ProducesResponseType(654)] 312[ProducesResponseType(1111)]
Mvc.Api.Analyzers.Test (64)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsFullyQualifiedProducesResponseType.Output.cs (3)
20[Microsoft.AspNetCore.Mvc.ProducesResponseType(StatusCodes.Status202Accepted)] 21[Microsoft.AspNetCore.Mvc.ProducesResponseType(StatusCodes.Status400BadRequest)] 22[Microsoft.AspNetCore.Mvc.ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsMissingStatusCodes.Input.cs (1)
12[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsMissingStatusCodes.Output.cs (3)
12[ProducesResponseType(StatusCodes.Status404NotFound)] 13[ProducesResponseType(StatusCodes.Status200OK)] 14[ProducesResponseType(StatusCodes.Status400BadRequest)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsMissingStatusCodesAndTypes.Input.cs (1)
12[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsMissingStatusCodesAndTypes.Output.cs (2)
12[ProducesResponseType(StatusCodes.Status404NotFound)] 13[ProducesResponseType(StatusCodes.Status200OK)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsNumericLiteralForNonExistingStatusCodeConstants.Output.cs (2)
9[ProducesResponseType(StatusCodes.Status200OK)] 10[ProducesResponseType(345)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Output.cs (2)
10[ProducesResponseType(StatusCodes.Status200OK)] 12[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsStatusCodes.Output.cs (2)
9[ProducesResponseType(StatusCodes.Status200OK)] 10[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsStatusCodesFromConstructorParameters.Output.cs (5)
14[ProducesResponseType(StatusCodes.Status200OK)] 15[ProducesResponseType(StatusCodes.Status201Created)] 16[ProducesResponseType(StatusCodes.Status202Accepted)] 17[ProducesResponseType(StatusCodes.Status204NoContent)] 18[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsStatusCodesFromMethodParameters.Output.cs (5)
14[ProducesResponseType(StatusCodes.Status200OK)] 15[ProducesResponseType(StatusCodes.Status201Created)] 16[ProducesResponseType(StatusCodes.Status202Accepted)] 17[ProducesResponseType(StatusCodes.Status204NoContent)] 18[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsStatusCodesFromObjectInitializer.Output.cs (5)
14[ProducesResponseType(StatusCodes.Status200OK)] 15[ProducesResponseType(StatusCodes.Status201Created)] 16[ProducesResponseType(StatusCodes.Status202Accepted)] 17[ProducesResponseType(StatusCodes.Status204NoContent)] 18[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsSuccessStatusCode.Output.cs (3)
15[ProducesResponseType(StatusCodes.Status201Created)] 16[ProducesResponseType(StatusCodes.Status400BadRequest)] 17[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWithConventionAddsMissingStatusCodes.Output.cs (2)
15[ProducesResponseType(StatusCodes.Status202Accepted)] 16[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWithConventionMethodAddsMissingStatusCodes.Output.cs (2)
9[ProducesResponseType(StatusCodes.Status202Accepted)] 10[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWorksOnExpressionBodiedMethod.Output.cs (1)
9[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWorksWhenMultipleIdenticalStatusCodesAreInError.Output.cs (2)
17[ProducesResponseType(StatusCodes.Status200OK)] 18[ProducesResponseType(StatusCodes.Status404NotFound)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWorksWithValidationProblem.Output.cs (1)
12[ProducesResponseType(StatusCodes.Status400BadRequest)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_ForControllerWithCustomConvention.cs (4)
38[ProducesResponseType(StatusCodes.Status204NoContent)] 39[ProducesResponseType(StatusCodes.Status404NotFound)] 40[ProducesResponseType(StatusCodes.Status409Conflict)] 41[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttribute_ReturnsDerivedType.cs (1)
11[ProducesResponseType(404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttributeAsynchronouslyReturnsValue_WithoutDocumentation.cs (1)
11[ProducesResponseType(404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttributeReturnsValue_WithoutDocumentation.cs (1)
9[ProducesResponseType(404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithConvention_ReturnsUndocumentedStatusCode.cs (2)
32[ProducesResponseType(200)] 33[ProducesResponseType(404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithProducesResponseTypeAttribute_DoesNotDocumentSuccessStatusCode.cs (2)
11[ProducesResponseType(200)] 12[ProducesResponseType(404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithProducesResponseTypeAttribute_DoesNotReturnDocumentedStatusCode.cs (3)
11[ProducesResponseType(200)] 12[ProducesResponseType(400)] 13[ProducesResponseType(404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiController_IfStatusCodesCannotBeInferred.cs (1)
9[ProducesResponseType(201)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForRazorPageModels.cs (1)
11[ProducesResponseType(302)]
TestFiles\SymbolApiResponseMetadataProviderTest\GetResponseMetadataTests.cs (6)
23[ProducesResponseType(201)] 29[ProducesResponseType(200, StatusCode = 203)] 50[ProducesResponseType(204)] 72public Produces201ResponseTypeAttribute() : base(201) { } 74public Produces201ResponseTypeAttribute(int statusCode) : base(statusCode) { } 82: base(0)