Closed davidvonthenen closed 1 month ago
The Warning
record in the Deepgram.Models.Listen.v1.REST
namespace has been updated to change the Type
property from a nullable enum (WarningType?
) to a nullable string (string?
). This allows for direct string representation of warning types. Additionally, a new computed property, WarningType
, has been added to convert the string value back into the corresponding WarningType
enum using a switch expression, providing a default mapping for unsupported languages.
File Path | Change Summary |
---|---|
Deepgram/Models/Listen/v1/REST/Warning.cs | - Updated Type property from WarningType? to string? .- Added computed property WarningType to convert Type to WarningType . |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Proposed changes
Addresses Issue: https://github.com/deepgram/deepgram-dotnet-sdk/issues/329
I think this is a good compromise to get the serialization to work correctly and also provide a mechanism to get the
WarningType
if so desired.This works below:
Types of changes
What types of changes does your code introduce to the community .NET SDK? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
NA
Summary by CodeRabbit
New Features
Type
property in theWarning
record now accepts string values, enhancing flexibility.WarningType
, to convert string values to corresponding enum values.Bug Fixes
WarningType
property.