Code generation coplex input parameter in WebApi suing Swashbuckle and NSwag

Viewed 253

I’m using Swashbuckle 5.6 to generate OpenAPI specification and Nswag 13.7.3 to generate c# client and models. I’m wondering is it currently possible to generate client method from this kind of controller (GET with query parameters)

public class TestController
{
    [HttpGet]
    public string GetComplex([FromQuery] ComplexType input )..
}

public class ComplexType
{
    public string Name {get; set;}
    public int Age {get; set;}
}

To this client

public class Client
{
    public string GetComplex(ComplexType type)...  
}

Instead of

public class Client
{
    public string GeComplex(strung name, int age)..
}
0 Answers
Related