-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IDP-1378] Support Http response codes with uri input parameters (#10)
* [IDP-1378] Support Http response codes with uri input parameters
- Loading branch information
1 parent
690b20e
commit 5398351
Showing
9 changed files
with
141 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
internal static class HttpResultsStatusCodeTypeHelpers | ||
{ | ||
public static Dictionary<string, int> HttpResultTypeToStatusCodes { get; } = new() | ||
{ | ||
{"Microsoft.AspNetCore.Http.HttpResults.Ok", 200}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Ok`1", 200}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Created", 201}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Created`1", 201}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.CreatedAtRoute", 201}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.CreatedAtRoute`1", 201}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Accepted", 202}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Accepted`1", 202}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.AcceptedAtRoute", 202}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.AcceptedAtRoute`1", 202}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.NoContent", 204}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.BadRequest", 400}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.BadRequest`1", 400}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult", 401}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.NotFound", 404}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.NotFound`1", 404}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Conflict", 409}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.Conflict`1", 409}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.UnprocessableEntity", 422}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.UnprocessableEntity`T", 422}, | ||
// Will be Supported in .NET 9 | ||
{"Microsoft.AspNetCore.Http.HttpResults.InternalServerError", 500}, | ||
{"Microsoft.AspNetCore.Http.HttpResults.InternalServerError`1", 500}, | ||
// Workleap's definition of the InternalServerError type result for other .NET versions | ||
{"Workleap.Extensions.OpenAPI.TypedResult.InternalServerError", 500}, | ||
{"Workleap.Extensions.OpenAPI.TypedResult.InternalServerError`1", 500} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters