Skip to content

Commit

Permalink
Fixed: do not generate ApiException and SwaggerResponse classes in no…
Browse files Browse the repository at this point in the history
…n-first OpenApiReferences, but make it possible to override that using MSBuild properties (#4891)
  • Loading branch information
bkoelman authored Jul 1, 2024
1 parent 8af0c71 commit b9c44ec
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<Command>$(_NSwagCommand) openapi2csclient /className:%(ClassName) /namespace:%(Namespace)</Command>
</CurrentOpenApiReference>
<CurrentOpenApiReference>
<Command Condition="!%(FirstForGenerator) OR (%(NSwagGenerateExceptionClasses) != '' AND !%(NSwagGenerateExceptionClasses))">%(Command) /GenerateExceptionClasses:false</Command>
<Command Condition="!%(FirstForGenerator) AND ('%(NSwagGenerateExceptionClasses)' == '')">%(Command) /generateExceptionClasses:false</Command>
<Command Condition="'%(NSwagGenerateExceptionClasses)' != ''">%(Command) /generateExceptionClasses:%(NSwagGenerateExceptionClasses)</Command>
</CurrentOpenApiReference>
<CurrentOpenApiReference>
<Command>%(Command) /input:"%(FullPath)" /output:"%(OutputPath)" %(Options)</Command>
Expand Down Expand Up @@ -154,6 +155,7 @@
<Command Condition="'%(NSwagWrapResponseMethods)' != ''">%(Command) /wrapResponseMethods:%(NSwagWrapResponseMethods)</Command>
</CurrentOpenApiReference>
<CurrentOpenApiReference>
<Command Condition="!%(FirstForGenerator) AND ('%(NSwagGenerateResponseClasses)' == '')">%(Command) /generateResponseClasses:false</Command>
<Command Condition="'%(NSwagGenerateResponseClasses)' != ''">%(Command) /generateResponseClasses:%(NSwagGenerateResponseClasses)</Command>
</CurrentOpenApiReference>
<CurrentOpenApiReference>
Expand Down

0 comments on commit b9c44ec

Please sign in to comment.