Nswag: Generate models with action uri and method type?

Created on 16 Sep 2020  Â·  4Comments  Â·  Source: RicoSuter/NSwag

I’m playing with generating c# client and models with nswag and I’m wonder is it possible to generate models with additional uri and method type property?
I’m thinking about having one generic api client that have model as input – read all data from this model (uri and method type as not serializable) and send request. With this I could only generate models and have rest in my code. Is this something I could do (maybe with some custom code) or this is not possible?

question

All 4 comments

Maybe you can do that by customizing the Class.liquid root template with your completely own implementation producing this.

Thanks I will go this route

Probably you can overwrite Client.Class.liquid* like this

your method
{% template %}

* we need to export the method to an own template so you can insert another method per operation, right?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BlackGad picture BlackGad  Â·  4Comments

p0wertiger picture p0wertiger  Â·  3Comments

Rui90 picture Rui90  Â·  4Comments

PabloInNz picture PabloInNz  Â·  4Comments

akamyshanov picture akamyshanov  Â·  4Comments