Open mdawood1991 opened 9 months ago
Forgot to add the Package Version:
<PackageReference Include="NSwag.AspNetCore" Version="14.0.0" />
<PackageReference Include="NSwag.MSBuild" Version="14.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
I have a
IOperationProcessor
which adds different types of exceptions to the schema, but since updating to netcore80 it is generating all base class properties in the result swagger.json file.As per the documentation JsonSchemaGenerator
System.Exception Only the properties "InnerException", "Message", "Source", "StackTrace" are generated.
My Exception classes are very simple e.g.
This is the implementation of the
CustomExceptionsGenerator
Note: I have also tried using the Attributes - same result
AddOpenApiDocument configuration is
This is an extract from the result specification json
and the schema for the ForbiddenAccessException is: