OpenAPITools / OpenAPITools/openapi-generator
[aspnetcore] configuration options to generate IActionResult` with `ActionResult<{{dataType}}>`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is there a way or config option (https://openapi-generator.tech/docs/generators/aspnetcore/) available to generate controllers using the generic IActionResult<T> as the return type instead of just IActionResult? (to constraint the expected object to be returned)
I see @InfoSec812 was looking forward for the same feature.
Same here... I need to modify the template for the controllers to replace IActionResult with ActionResult<{{dataType}}>
Originally posted by @InfoSec812 in https://github.com/OpenAPITools/openapi-generator/issues/6215#issuecomment-670475820
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the aspnetcore generator documentation linked in the issue and the controller templates it describes. Determine whether a configuration option can produce generic ActionResult return types; done means generated controllers use the requested generic return type with the appropriate data type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100