21 references to ProducesErrorResponseTypeAttribute
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (8)
ApiResponseTypeProviderTest.cs (8)
339actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(errorType); 391actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(errorType); 434actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(errorType); 485actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(InvalidTimeZoneException)); 531actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(void)); 577actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(ProblemDetails)); 627actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(ProblemDetails)); 657actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(ProblemDetails));
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
44var defaultErrorTypeAttribute = new ProducesErrorResponseTypeAttribute(defaultErrorType);
Microsoft.AspNetCore.Mvc.Core.Test (6)
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (6)
10[assembly: ProducesErrorResponseType(typeof(InvalidEnumArgumentException))] 104controllerAttributes: new[] { new ProducesErrorResponseTypeAttribute(expected) }); 122actionAttributes: new[] { new ProducesErrorResponseTypeAttribute(expected) }, 123controllerAttributes: new[] { new ProducesErrorResponseTypeAttribute(typeof(Guid)) }); 139var action = GetActionModel(nameof(TestController.Delete), new[] { new ProducesErrorResponseTypeAttribute(expected) }); 153return new ApiConventionApplicationModelConvention(new ProducesErrorResponseTypeAttribute(errorType));
Mvc.Api.Analyzers.Test (6)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Input.cs (1)
3[ProducesErrorResponseType(typeof(CodeFixAddsResponseTypeWhenDifferentErrorModel))]
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Output.cs (1)
5[ProducesErrorResponseType(typeof(CodeFixAddsResponseTypeWhenDifferentErrorModel))]
TestFiles\SymbolApiResponseMetadataProviderTest\GetErrorResponseType_ReturnsTypeDefinedAtAction.cs (2)
8[ProducesErrorResponseType(typeof(ModelStateDictionary))] 11[ProducesErrorResponseType(typeof(GetErrorResponseType_ReturnsTypeDefinedAtActionModel))]
TestFiles\SymbolApiResponseMetadataProviderTest\GetErrorResponseType_ReturnsTypeDefinedAtAssembly.cs (1)
6[assembly: ProducesErrorResponseType(typeof(Microsoft.AspNetCore.Mvc.Api.Analyzers.TestFiles.SymbolApiResponseMetadataProviderTest.GetErrorResponseType_ReturnsTypeDefinedAtAssemblyModel))]
TestFiles\SymbolApiResponseMetadataProviderTest\GetErrorResponseType_ReturnsTypeDefinedAtController.cs (1)
6[ProducesErrorResponseType(typeof(GetErrorResponseType_ReturnsTypeDefinedAtControllerModel))]