From e7cca3aaa3ee5ba90cde68d0de7b7b91ad009522 Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Sun, 12 May 2024 12:52:56 +0200
Subject: [PATCH] Fixed: do not generate ApiException and SwaggerResponse
classes in non-first OpenApiReferences, but make it possible to override that
using MSBuild properties
---
.../NSwag.ApiDescription.Client.targets | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/NSwag.ApiDescription.Client/NSwag.ApiDescription.Client.targets b/src/NSwag.ApiDescription.Client/NSwag.ApiDescription.Client.targets
index b1f8ed7df4..fdeea20bf5 100644
--- a/src/NSwag.ApiDescription.Client/NSwag.ApiDescription.Client.targets
+++ b/src/NSwag.ApiDescription.Client/NSwag.ApiDescription.Client.targets
@@ -19,7 +19,8 @@
$(_NSwagCommand) openapi2csclient /className:%(ClassName) /namespace:%(Namespace)
- %(Command) /GenerateExceptionClasses:false
+ %(Command) /generateExceptionClasses:false
+ %(Command) /generateExceptionClasses:%(NSwagGenerateExceptionClasses)
%(Command) /input:"%(FullPath)" /output:"%(OutputPath)" %(Options)
@@ -154,6 +155,7 @@
%(Command) /wrapResponseMethods:%(NSwagWrapResponseMethods)
+ %(Command) /generateResponseClasses:false
%(Command) /generateResponseClasses:%(NSwagGenerateResponseClasses)