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