I have a Web project with different API controllers.
When creating the client using NSwag, all methods from all controllers are put in the same API Client.
How could I get one ApiClient per API controller?
Thanks in advance.
I have a Web project with different API controllers.
When creating the client using NSwag, all methods from all controllers are put in the same API Client.
How could I get one ApiClient per API controller?
Thanks in advance.
Put this in you nswag configuration under codeGenerators.openApiToCSharpClient
->
"operationGenerationMode": "MultipleClientsFromOperationId"
i know it's too late, but now i encountered a similiar problem so the answer is with typescript client
"openApiToTypeScriptClient": {
"operationGenerationMode": "MultipleClientsFromPathSegments",
.
}
this line make every controller a class in api