You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that json converter ConfigureForNodaTime not work as expected on SchemaSettings, but work good on .NET Api json options. For example type Period not converted to string but as complex object similar to C# class. Nswag has a wrong behavior because correct conversion produce a string like described on NodaTime source code (https://github.com/nodatime/nodatime/blob/main/src/NodaTime/Text/PeriodPattern.cs#L70).
I write a workaround for this specific issue that map manually Period type:
After .NET 8 migration I move NSwag from v13 to v14. I have this Startup json api configuration:
It seems that json converter
ConfigureForNodaTime
not work as expected onSchemaSettings
, but work good on .NET Api json options. For example typePeriod
not converted to string but as complex object similar to C# class. Nswag has a wrong behavior because correct conversion produce a string like described on NodaTime source code (https://github.com/nodatime/nodatime/blob/main/src/NodaTime/Text/PeriodPattern.cs#L70).I write a workaround for this specific issue that map manually Period type:
but i expect that
ConfigureForNodaTime
work fine like other converters for exampleJsonStringEnumConverter
.The text was updated successfully, but these errors were encountered: