Extend Results in TypedResults to support more than 6 types
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
## Summary
Currently the Results type has a maximum of 6 generic parameters. This limits the number of strongly typed results that can be returned by a Web API. This could be extended to a larger number to support use cases with a larger number of types returned.
## Motivation and goals
I find it is quite common to return quite large numbers of TypedResults.
For example, on the most recent case, I need 7 result types:
`Ok`, `BadRequest`, `NotFound`, `Conflict`, `ForbidHttpResult`, `InternalServerError`, `StatusCodeHttpResult`.
I also sometimes find myself returning multiple generic TypedResults to represent different types of responses. For example, `Ok`, `Ok`, `Ok`, when combined with typical error cases, this frequently exceeds the current limit of 6.
I would suggest that is would be useful if the current limit of 6 were to be extended.
Contributor guide
Assessment
This issue has not been assessed yet.