Async Service APIs not Shown?

When we use an Async service, Swagger isn’t generating the docs for that specific API call (other non-Async calls in the service get generated). If I make the service non Async, it generates fine.

Request DTO/API Decleration:

 [Route("/UpdateInfo/{Id}", "PUT", Summary = "Updates info.")]
    public class UpdateInfoReq : IReturn<InfoUpdateResponseDTO>
    {
        [ApiMember(IsRequired = true)]
        public Guid Id { get; set; }
        [ApiMember(IsRequired = true)]
        public InfoUpdateDTO myInfoUpdate { get; set; }
    }

Service Signature:

public class MyController2 : Service
    {
public async Task<InfoUpdateResponseDTO> Update(UpdateInfoReq query)
        {...implementation...}
}

I’m sure I’m just making a simple mistake. Help?

Your Service implementations need to use the HTTP Verb it handles as its method name, so you need to replace Update with either Put to handle HTTP PUT Requests or Any to be able to handle UpdateInfoReq sent with any HTTP Verb, e.g:

public async Task<InfoUpdateResponseDTO> Put(UpdateInfoReq query)
        {...implementation...}

Are you using Swagger plugin or OpenApi? I tried async service with OpenApi plugin and it shows UpdateInfo route path.

Thanks. Not sure what my issue was - perhaps the browser was caching an old version. You can delete this thread.