The option GenerateClientInterfaces refers only to the object that contains the method calls, not the generated types themselves, which are always classes.
What would be the most practical way to get nswag to generate interfaces for the types themselves?
I need this because I want to use mobx, a state management library, which can wrap plain javascript objects, but leaves those with a non-trivial constructor function alone.
So without additional control over how types are generated, I would need to re-write all types by hand.
GenerateClientInterfaces affect only client classes, if you need interface DTOs, use the setting TypeStyle=Interface
Well, I now got some interfaces, but the client's methods don't use them.
So when a client function returns X, and there is also IX, what then? I am to write myX.toJSON() and then cast the result?
I just found TypeScriptTypeStyle.Interface and that's what I'm trying now, despite it saying experimental. Got an issue with dates, so I'm now going for momentjs.
This feature is no longer experimental.
Closing as the original question is now positively answered.