5

For a project, I use the swagger hub to build my API. From the swagger hub, I generate the server code. However, when this code is generated it has synchronous controllers. Is there a way to specify in the swagger.yml to generate async controllers instead of synchronous?

  • Open Api 3.0.0
  • ASP.net Core

Generated:

public virtual IActionResult GetUserById([FromRoute][Required]string userId) { }

Should Be

public virtual Task<IActionResult> GetUserById([FromRoute][Required]string userId) { }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.