RicoSuter/NSwag

ApiException partly missing when referencing multiple contract files

Open

#3.448 geöffnet am 4. Mai 2021

Auf GitHub ansehen
 (6 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)C# (1.189 Forks)batch import
help wanted

Repository-Metriken

Stars
 (6.291 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I have multiple OpenApi contracts that I'm referencing with OpenApiReference in the csproj file. When I generate the code, I place each client in a different namespace. I have some types with same names that would clash in the same namespace.

In the generated code, I get ApiException code for one of the contracts, but not for the other. Since they are in different namespaces, this doesn't compile. I have tried setting the generateExceptionClasses and exceptionClass.

Contributor Guide