32 references to ProducesResponseTypeMetadata
Microsoft.AspNetCore.Http.Abstractions.Tests (5)
MetadataTests.cs (5)
14Assert.Equal("Produces StatusCode: 100", new ProducesResponseTypeMetadata(100).ToString()); 15Assert.Equal("Produces StatusCode: 200, ContentTypes: application/json", new ProducesResponseTypeMetadata(200, contentTypes: new[] { "application/json" }).ToString()); 16Assert.Equal("Produces StatusCode: 300, ContentTypes: application/json,text/plain", new ProducesResponseTypeMetadata(300, contentTypes: new[] { "application/json", "text/plain" }).ToString()); 17Assert.Equal("Produces StatusCode: 400, Type: System.Version", new ProducesResponseTypeMetadata(400, type: typeof(Version)).ToString()); 18Assert.Equal("Produces StatusCode: 500, Type: System.Void", new ProducesResponseTypeMetadata(500, type: typeof(void)).ToString());
Microsoft.AspNetCore.Http.Results (11)
Accepted.cs (1)
84builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(void)));
AcceptedAtRoute.cs (1)
111builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(void)));
BadRequest.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(void)));
Conflict.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status409Conflict, typeof(void)));
Created.cs (1)
84builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(void)));
CreatedAtRoute.cs (1)
111builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(void)));
InternalServerError.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status500InternalServerError, typeof(void)));
NoContent.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status204NoContent, typeof(void)));
NotFound.cs (1)
53builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status404NotFound, typeof(void)));
Ok.cs (1)
53builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(void)));
UnprocessableEntity.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status422UnprocessableEntity, typeof(void)));
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
DefaultApiDescriptionProviderTest.cs (2)
529action.EndpointMetadata = new List<object>() { new ProducesResponseTypeMetadata(200, typeof(Product)) }; 548action.EndpointMetadata = new List<object>() { new ProducesResponseTypeMetadata(200, typeof(Product)) };
Microsoft.AspNetCore.OpenApi.Tests (12)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (1)
72.WithMetadata(new ProducesResponseTypeMetadata(StatusCodes.Status200OK))
Services\OpenApiGeneratorTests.cs (11)
540new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(ProblemDetails), new [] { "application/json+problem" }) 557new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(InferredJsonClass), new[] { "application/json" }), 573new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(InferredJsonClass), new[] { "application/json" }), 587new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(InferredJsonClass), new[] { "application/json" }), 588new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(HttpValidationProblemDetails), new[] { "application/problem+json" }), 589new ProducesResponseTypeMetadata(StatusCodes.Status404NotFound, typeof(ProblemDetails), new[] { "application/problem+json" }), 590new ProducesResponseTypeMetadata(StatusCodes.Status409Conflict, typeof(ProblemDetails), new[] { "application/problem+json" }) 630new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(InferredJsonClass), new[] { "application/json" }), 631new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(InferredJsonClass), new[] { "application/json" }) 877new ProducesResponseTypeMetadata(StatusCodes.Status200OK), 879new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(InferredJsonClass), new[] { "application/json" }),
Microsoft.AspNetCore.Routing (2)
Builder\OpenApiRouteHandlerBuilderExtensions.cs (2)
84return builder.WithMetadata(new ProducesResponseTypeMetadata(statusCode, responseType ?? typeof(void))); 91return builder.WithMetadata(new ProducesResponseTypeMetadata(statusCode, responseType ?? typeof(void), contentTypes));