Hello,
Is it possible to generate a client c # without ui swagger? My api it's private, I do not want a ui swagger.
You can generate from DLL with no ui/middleware at all...
@RSuter I have problems, NSwagStudio generate this:
public async System.Threading.Tasks.Task<FileResponse> RegistroAsync(Usuario usuario, System.Threading.CancellationToken cancellationToken)
FileResponse?????? i don't understand sorry.
My controller api:
[HttpPost]
public async Task<IActionResult> Registro([FromBody] Usuario usuario)
{
string result = await _usuarioRepository.RegistrarUsuarioAsync(usuario);
return Ok(result);
}
FileResponse is a generated wrapper to access a file response (it contains the received headers, a response stream, etc.)
Important: https://github.com/RSuter/NSwag/wiki/WebApiToSwaggerGenerator#specify-the-response-type-of-an-action
@RSuter thanks a lot! fixed it