65 references to ProducesResponseType
ApiExplorerWebSite (11)
Controllers\ApiExplorerResponseTypeOverrideOnActionController.cs (1)
20[ProducesResponseType(typeof(ErrorInfoOverride), 500)] // overriding the type specified on the server
Controllers\ApiExplorerResponseTypeWithAttributeController.cs (9)
12[ProducesResponseType(typeof(void), 204)] 38[ProducesResponseType(typeof(void), 204)] 58[ProducesResponseType(typeof(Product), 201)] 59[ProducesResponseType(typeof(SerializableError), 400)] 66[ProducesResponseType(typeof(Product), 201)] 67[ProducesResponseType(typeof(SerializableError), 400)] 73[ProducesResponseType(typeof(Product), 200)] 74[ProducesResponseType(typeof(SerializableError), 400)] 81[ProducesResponseType(typeof(SerializableError), 400)]
Controllers\ApiExplorerSystemVoid.cs (1)
13[ProducesResponseType(typeof(void), 401)]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (23)
ApiResponseTypeProviderTest.cs (5)
82new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(object), 201), FilterScope.Controller), 83new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ProblemDetails), 400), FilterScope.Controller), 84new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(BaseModel), 201), FilterScope.Action), 430new ProducesResponseTypeAttribute(typeof(DivideByZeroException), 415), 526new ProducesResponseTypeAttribute(typeof(InvalidCastException), 400),
DefaultApiDescriptionProviderTest.cs (12)
550new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(Customer), 200), FilterScope.Action) 649new ProducesResponseTypeAttribute(typeof(BadData), 400), 652new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 749new ProducesResponseTypeAttribute(typeof(BadData), 400), 752new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 859new ProducesResponseTypeAttribute(typeof(BadData), 400), 862new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 929new ProducesResponseTypeAttribute(typeof(BadData), 400), 932new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 999new ProducesResponseTypeAttribute(typeof(BadData), 400), 1002new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 1074var filter = new ProducesResponseTypeAttribute(typeof(void), statusCode: 204);
EndpointMetadataApiDescriptionProviderTest.cs (6)
188[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 215[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 253[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 358[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 386[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 1060builder.MapGet("/api/todos", [ProducesResponseType(typeof(List<string>), StatusCodes.Status200OK)] () => "")
Microsoft.AspNetCore.Mvc.Core (2)
ProducesResponseTypeAttribute.cs (1)
24: this(typeof(void), statusCode)
ProducesResponseTypeOfTAttribute.cs (1)
14public ProducesResponseTypeAttribute(int statusCode) : base(typeof(T), statusCode) { }
Microsoft.AspNetCore.Mvc.Core.Test (4)
ProducesResponseTypeAttributeTests.cs (4)
53var producesResponseTypeAttribute = new ProducesResponseTypeAttribute(typeof(Person), StatusCodes.Status200OK); 64var producesResponseTypeAttribute = new ProducesResponseTypeAttribute(typeof(Person), StatusCodes.Status200OK); 74var producesResponseTypeAttribute = new ProducesResponseTypeAttribute(typeof(Person), StatusCodes.Status200OK) 87var producesResponseTypeAttribute = new ProducesResponseTypeAttribute(typeof(Person), StatusCodes.Status200OK);
Microsoft.AspNetCore.OpenApi.Tests (8)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (3)
19[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 319[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created, Description = expectedCreatedDescription)] 350[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created, Description = null)] // Explicitly set to NULL
Services\OpenApiGeneratorTests.cs (4)
200[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 225[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 247[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 282[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)]
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
706[ProducesResponseType(typeof(Todo), StatusCodes.Status200OK)]
Mvc.Api.Analyzers.Test (17)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsMissingStatusCodesAndTypes.Output.cs (1)
14[ProducesResponseType(typeof(ModelBinding.ModelStateDictionary), StatusCodes.Status400BadRequest)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Output.cs (1)
11[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_ForActionResultOfTReturningMethodWithoutSomeAttributes.cs (2)
11[ProducesResponseType(typeof(string), 200)] 12[ProducesResponseType(typeof(string), 404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfAsyncMethodReturningValueTaskWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
12[ProducesResponseType(typeof(string), 404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfAsyncMethodWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
12[ProducesResponseType(typeof(string), 200)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
9[ProducesResponseType(typeof(string), 200)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiController_WithAllDocumentedStatusCodes.cs (3)
13[ProducesResponseType(typeof(string), 200)] 14[ProducesResponseType(typeof(string), 400)] 15[ProducesResponseType(typeof(string), 404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForNonApiController.cs (1)
10[ProducesResponseType(typeof(string), 200)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForReturnStatementsInLambdas.cs (2)
14[ProducesResponseType(typeof(string), 200)] 15[ProducesResponseType(typeof(string), 404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForReturnStatementsInLocalFunctions.cs (2)
9[ProducesResponseType(typeof(string), 200)] 10[ProducesResponseType(typeof(string), 404)]
TestFiles\SymbolApiResponseMetadataProviderTest\GetResponseMetadataTests.cs (2)
26[ProducesResponseType(typeof(Person), 202)] 32[ProducesResponseType(typeof(object), 200, Type = typeof(Person), StatusCode = 201)]