You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using NSwag v14.0.7.0 in my project, and I've encountered an issue where Swagger does not load and the C# client code is not generated for endpoints returning Task<MediatR.Unit>.
Reproduction Steps:
Define an endpoint with a return type of Task<MediatR.Unit>.
Attempt to load Swagger UI or generate C# client code using NSwag.
Expected Behavior:
Swagger UI should load successfully, and C# client code should be generated for endpoints returning Task<MediatR.Unit>, similar to how it worked with Swashbuckle.
Actual Behavior:
Swagger UI does not load, and C# client code is not generated for endpoints returning Task<MediatR.Unit>.
Code Snippet:
[HttpPost]
public async Task<BaseResponse<Unit>> Create([FromBody] InvoiceDetail invoiceDetail)
{
var result = await _mediator.Send(new CreateInvoiceDetailCommand { InvoiceDetail = invoiceDetail });
return result;
}
[HttpPost]
public async Task<Unit> Create([FromBody] InvoiceDetail invoiceDetail)
{
var result = await _mediator.Send(new CreateInvoiceDetailCommand { InvoiceDetail = invoiceDetail });
return new MediatR.Unit();
}
Additional Information:
NSwag version: 14.0.7.0
Previously, I was using Swashbuckle, and it worked correctly with this type of endpoint.
The text was updated successfully, but these errors were encountered:
I'm currently using NSwag v14.0.7.0 in my project, and I've encountered an issue where Swagger does not load and the C# client code is not generated for endpoints returning Task<MediatR.Unit>.
Reproduction Steps:
Expected Behavior:
Swagger UI should load successfully, and C# client code should be generated for endpoints returning Task<MediatR.Unit>, similar to how it worked with Swashbuckle.
Actual Behavior:
Swagger UI does not load, and C# client code is not generated for endpoints returning Task<MediatR.Unit>.
Code Snippet:
Additional Information:
The text was updated successfully, but these errors were encountered: