Skip to content

Commit

Permalink
fix: Fixed some Enum type names.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jun 15, 2024
1 parent 15675bf commit 792358f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/OpenApiGenerator.Core/Models/TypeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static string GetCSharpType(
($"global::{settings.Namespace}.{model.ExternalClassName}", true),

("string", _) when schema.Value.Enum.Any() =>
($"global::{settings.Namespace}.{(schema.Value is { Reference: not null } ? $"{schema.Value.Reference.Id}" : (model with { Style = ModelStyle.Enumeration }).ExternalClassName)}", true),
($"global::{settings.Namespace}.{(schema.Value is { Reference: not null } ? ModelData.FromKey(schema.Value.Reference.Id, settings).ClassName : (model with { Style = ModelStyle.Enumeration }).ExternalClassName)}", true),
// ("string", _) when schema.Value.Enum.Any() && settings.JsonSerializerType != JsonSerializerType.NewtonsoftJson =>
// ("string", true),

Expand Down

0 comments on commit 792358f

Please sign in to comment.