Skip to content

Commit d14bffe

Browse files
committed
Fix tests.
1 parent 1dfa196 commit d14bffe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/GeneratedEndpoints.Tests.Lab/GetUserEndpoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal static class GetUserEndpoint
1616
[AllowAnonymous]
1717
[Accepts(typeof(GetUserRequest), "application/json", "application/xml")]
1818
[Accepts<GetUserMetadata>("application/json", "application/xml")]
19-
[ProducesResponse(typeof(UserProfile), StatusCodes.Status200OK, "application/json")]
19+
[ProducesResponse( StatusCodes.Status200OK, "application/json", ResponseType = typeof(UserProfile))]
2020
[ProducesResponse<UserProfile>(StatusCodes.Status202Accepted, "application/json")]
2121
[ProducesProblem(StatusCodes.Status500InternalServerError, "application/problem+json")]
2222
[ProducesValidationProblem(StatusCodes.Status400BadRequest, "application/problem+json")]

tests/GeneratedEndpoints.Tests/GeneratedEndpointsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public async Task MapAllAttributesAndHttpMethods(bool withNamespace)
116116
[RequireAuthorization("PolicyA", "PolicyB")]
117117
[DisableAntiforgery]
118118
[Accepts(typeof(ClassLevelRequest), "application/xml", "text/xml")]
119-
[Microsoft.AspNetCore.Generated.Attributes.ProducesResponse(typeof(ClassLevelResponse), 201, "application/json", "text/json")]
119+
[ProducesResponse(201, "application/json", "text/json", ResponseType = typeof(ClassLevelResponse))]
120120
[ProducesProblem(503, "application/problem+json")]
121121
[ProducesValidationProblem(409, "application/problem+json", "text/plain")]
122122
[ExcludeFromDescription]

0 commit comments

Comments
 (0)