From b9c44ec72dc1cad571cdd686c02456ccbaf60ed2 Mon Sep 17 00:00:00 2001 From: Bart Koelman <10324372+bkoelman@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:00:14 +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 (#4891) --- .../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)