We currently have over 100 DTOs already well-designed in a separate assembly and span multiple namespaces. How can we instruct the NSwag C# client generator to utilize our existing DTO library instead of generating its own DTOs?
How to tell NSwag C# Client generator to use our DTOs instead of generating new ones?
I found it:
{
"codeGenerators": {
"openApiToCSharpClient": {
"generateDtoTypes": false,
"additionalNamespaceUsages": [
"Your.DTOTypes.Namespace"
]
}
}
}
© 2022 - 2024 — McMap. All rights reserved.