-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
After updating from 8.1.1 to 8.1.2, there is an issue with type names for nullable enums.
It appears that all enums that are used as nullable values, e.g. class Request { MyEnum? Value { get; set; } }
have their schema name changed in the generated resulting OpenAPI spec from MyEnum
to MyEnumNullable
.
This breaks client code generation that relies on the type names to match C# source, e.g. when using NSwagGen with GenerateDtoTypes:false
, the generated client code fails to compile because it references a non-existing MyEnumNullable
.
Expected behavior
Schema names should match C# source names
Actual behavior
Schema names are altered.
Steps to reproduce
No response
Exception(s) (if any)
No response
Swashbuckle.AspNetCore version
8.1.2
.NET Version
9.0.5
Anything else?
No response
JackMorrissey, glittle, Guymestef and BramMusters