Open SimonCull opened 4 years ago
When NSwag.ApiDescription.Client generates the client .cs files it only generates the ApiException partial classes for the first of these.
Example of the CsProj file:
<ItemGroup> <OpenApiReference Include="Api1.OpenApi.json" Namespace="Project.Api1Client" /> <OpenApiReference Include="Api2.OpenApi.json" Namespace="Project.Api2Client" /> <OpenApiReference Include="Api3.OpenApi.json" Namespace="Project.Api3Client" /> </ItemGroup>
Both ApiException and ApiException are only generated in Api1.OpenApiClient.cs withing the Project.Api1Client namespace. Both Api2.OpenApiClient.cs and Api3.OpenApiClient.cs do not have ApiException and ApiException in their respective namespaces
Potentially a wider .Net issue: here
The work around posted here: https://github.com/dotnet/aspnetcore/issues/18204#issuecomment-606281714 works.
This problem still happens in VS2022, hoping for a fix some day.
When NSwag.ApiDescription.Client generates the client .cs files it only generates the ApiException partial classes for the first of these.
Example of the CsProj file:
Both ApiException and ApiException are only generated in Api1.OpenApiClient.cs withing the Project.Api1Client namespace. Both Api2.OpenApiClient.cs and Api3.OpenApiClient.cs do not have ApiException and ApiException in their respective namespaces