3 types derived from ProducesResponseTypeAttribute
Microsoft.AspNetCore.Mvc.Core (1)
ProducesResponseTypeOfTAttribute.cs (1)
8public class ProducesResponseTypeAttribute<T> : ProducesResponseTypeAttribute
Mvc.Api.Analyzers.Test (2)
TestFiles\SymbolApiResponseMetadataProviderTest\GetResponseMetadataTests.cs (2)
70public class Produces201ResponseTypeAttribute : ProducesResponseTypeAttribute 77public class CustomInvalidProducesResponseTypeAttribute : ProducesResponseTypeAttribute
222 instantiations of ProducesResponseTypeAttribute
ApiExplorerWebSite (16)
Controllers\ApiExplorerResponseTypeOverrideOnActionController.cs (1)
20[ProducesResponseType(typeof(ErrorInfoOverride), 500)] // overriding the type specified on the server
Controllers\ApiExplorerResponseTypeWithApiConventionController.cs (4)
24[ProducesResponseType(202)] 25[ProducesResponseType(403)] 48[ProducesResponseType(302)] 49[ProducesResponseType(409)]
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 (2)
13[ProducesResponseType(typeof(void), 401)] 16[ProducesResponseType(401)]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (69)
ApiResponseTypeProviderTest.cs (39)
25new ProducesResponseTypeAttribute(201), 26new ProducesResponseTypeAttribute(404), 70[ProducesResponseType(301)] 71[ProducesResponseType(404)] 81new FilterDescriptor(new ProducesResponseTypeAttribute(400), FilterScope.Global), 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), 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), 430new ProducesResponseTypeAttribute(typeof(DivideByZeroException), 415), 480new ProducesResponseTypeAttribute(201), 481new ProducesResponseTypeAttribute(300), 482new ProducesResponseTypeAttribute(500), 526new ProducesResponseTypeAttribute(typeof(InvalidCastException), 400), 527new ProducesResponseTypeAttribute(415), 573new ProducesResponseTypeAttribute(200), 574new ProducesResponseTypeAttribute(400), 623new ProducesResponseTypeAttribute(200), 624new ProducesResponseTypeAttribute(400), 655new ProducesResponseTypeAttribute(200), 714actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ValidationProblemDetails), 400, "application/problem+json"), FilterScope.Action)); 715actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ProblemDetails), 404, "application/problem+json"), FilterScope.Action)); 716actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(409), FilterScope.Action)); 828[ProducesResponseType(206)] 829[ProducesResponseType(406)]
DefaultApiDescriptionProviderTest.cs (20)
550new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(Customer), 200), FilterScope.Action) 646new ProducesResponseTypeAttribute(304), 649new ProducesResponseTypeAttribute(typeof(BadData), 400), 652new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 746new ProducesResponseTypeAttribute(200), 749new ProducesResponseTypeAttribute(typeof(BadData), 400), 752new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 853new ProducesResponseTypeAttribute(200), 856new ProducesResponseTypeAttribute(202), 859new ProducesResponseTypeAttribute(typeof(BadData), 400), 862new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 923new ProducesResponseTypeAttribute(201), 926new ProducesResponseTypeAttribute(204), 929new ProducesResponseTypeAttribute(typeof(BadData), 400), 932new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 993new ProducesResponseTypeAttribute(200), 996new ProducesResponseTypeAttribute(201), 999new ProducesResponseTypeAttribute(typeof(BadData), 400), 1002new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), 1074var filter = new ProducesResponseTypeAttribute(typeof(void), statusCode: 204);
EndpointMetadataApiDescriptionProviderTest.cs (10)
188[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 215[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 216[ProducesResponseType(StatusCodes.Status400BadRequest)] 253[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 254[ProducesResponseType(StatusCodes.Status400BadRequest)] 358[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 359[ProducesResponseType(StatusCodes.Status400BadRequest)] 386[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 387[ProducesResponseType(StatusCodes.Status400BadRequest)] 1060builder.MapGet("/api/todos", [ProducesResponseType(typeof(List<string>), StatusCodes.Status200OK)] () => "")
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 (16)
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)]
ProducesResponseTypeAttributeTests.cs (6)
17var producesContentAttribute = new ProducesResponseTypeAttribute(typeof(void), StatusCodes.Status200OK, "application/json", "text/json;charset=utf-8"); 42() => new ProducesResponseTypeAttribute(typeof(void), StatusCodes.Status200OK, contentTypes[0], contentTypes.Skip(1).ToArray())); 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 (23)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (6)
19[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 20[ProducesResponseType(StatusCodes.Status400BadRequest)] 319[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created, Description = expectedCreatedDescription)] 320[ProducesResponseType(StatusCodes.Status400BadRequest, Description = expectedBadRequestDescription)] 350[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created, Description = null)] // Explicitly set to NULL 351[ProducesResponseType(StatusCodes.Status400BadRequest)] // Omitted, meaning it should be NULL
Services\OpenApiGeneratorTests.cs (16)
200[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 201[ProducesResponseType(StatusCodes.Status400BadRequest)] 225[ProducesResponseType(typeof(InferredJsonClass), StatusCodes.Status201Created)] 226[ProducesResponseType(StatusCodes.Status400BadRequest)] 247[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 248[ProducesResponseType(StatusCodes.Status400BadRequest)] 264[ProducesResponseType(StatusCodes.Status100Continue)] 265[ProducesResponseType(StatusCodes.Status101SwitchingProtocols)] 281[ProducesResponseType(StatusCodes.Status100Continue)] 282[ProducesResponseType(typeof(TimeSpan), StatusCodes.Status201Created)] 283[ProducesResponseType(StatusCodes.Status300MultipleChoices)] 284[ProducesResponseType(StatusCodes.Status400BadRequest)] 285[ProducesResponseType(StatusCodes.Status500InternalServerError)] 310[ProducesResponseType(46)] 311[ProducesResponseType(654)] 312[ProducesResponseType(1111)]
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
706[ProducesResponseType(typeof(Todo), StatusCodes.Status200OK)]
Mvc.Api.Analyzers.Test (78)
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 (3)
12[ProducesResponseType(StatusCodes.Status404NotFound)] 13[ProducesResponseType(StatusCodes.Status200OK)] 14[ProducesResponseType(typeof(ModelBinding.ModelStateDictionary), StatusCodes.Status400BadRequest)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsNumericLiteralForNonExistingStatusCodeConstants.Output.cs (2)
9[ProducesResponseType(StatusCodes.Status200OK)] 10[ProducesResponseType(345)]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Output.cs (3)
10[ProducesResponseType(StatusCodes.Status200OK)] 11[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] 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_ForActionResultOfTReturningMethodWithoutSomeAttributes.cs (2)
11[ProducesResponseType(typeof(string), 200)] 12[ProducesResponseType(typeof(string), 404)]
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_IfAsyncMethodReturningValueTaskWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
12[ProducesResponseType(typeof(string), 404)]
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfAsyncMethodWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
12[ProducesResponseType(typeof(string), 200)]
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\DiagnosticsAreReturned_IfMethodWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
9[ProducesResponseType(typeof(string), 200)]
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiController_IfStatusCodesCannotBeInferred.cs (1)
9[ProducesResponseType(201)]
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_ForRazorPageModels.cs (1)
11[ProducesResponseType(302)]
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 (5)
23[ProducesResponseType(201)] 26[ProducesResponseType(typeof(Person), 202)] 29[ProducesResponseType(200, StatusCode = 203)] 32[ProducesResponseType(typeof(object), 200, Type = typeof(Person), StatusCode = 201)] 50[ProducesResponseType(204)]
29 references to ProducesResponseTypeAttribute
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiResponseTypeProvider.cs (3)
162if (metadataAttribute is not ProducesResponseTypeAttribute) 193errorSetByDefault = metadataAttribute is ProducesResponseTypeAttribute { IsResponseTypeSetByDefault: true }; 207if (metadataAttribute is ProducesResponseTypeAttribute)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
1074var filter = new ProducesResponseTypeAttribute(typeof(void), statusCode: 204);
Microsoft.AspNetCore.Mvc.Core (11)
ApiConventionTypeAttribute.cs (2)
76$"{nameof(ProducesResponseTypeAttribute)}, {nameof(ProducesDefaultResponseTypeAttribute)}, {nameof(ApiConventionNameMatchAttribute)}"); 84return attribute is ProducesResponseTypeAttribute ||
ProducesDefaultResponseTypeAttribute.cs (3)
10/// A filter that specifies the <see cref="System.Type"/> for all HTTP status codes that are not covered by <see cref="ProducesResponseTypeAttribute"/>. 16/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>. 24/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>.
ProducesErrorResponseTypeAttribute.cs (1)
9/// <see cref="Type"/> specifies the error model type associated with a <see cref="ProducesResponseTypeAttribute"/>
ProducesResponseTypeAttribute.cs (3)
20/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>. 30/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>. 42/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>.
ProducesResponseTypeOfTAttribute.cs (2)
11/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>. 17/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>.
Microsoft.AspNetCore.Mvc.Core.Test (7)
ApiConventionMethodAttributeTest.cs (1)
150$"The following attributes are allowed on API convention methods: {nameof(ProducesResponseTypeAttribute)}, {nameof(ProducesDefaultResponseTypeAttribute)}, {nameof(ApiConventionNameMatchAttribute)}";
ApiConventionTypeAttributeTest.cs (1)
85$"The following attributes are allowed on API convention methods: {nameof(ProducesResponseTypeAttribute)}, {nameof(ProducesDefaultResponseTypeAttribute)}, {nameof(ApiConventionNameMatchAttribute)}";
ProducesResponseTypeAttributeTests.cs (5)
17var producesContentAttribute = new ProducesResponseTypeAttribute(typeof(void), StatusCodes.Status200OK, "application/json", "text/json;charset=utf-8"); 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);
Mvc.Analyzers.Test (7)
CodeAnalysisExtensionsTest.cs (7)
25var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName); 53var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName); 90var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName); 127var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName); 164var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName); 209var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName); 252var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName);