diff --git a/src/libs/Directory.Build.props b/src/libs/Directory.Build.props index 2bfcb33bbb..195f2d62d2 100644 --- a/src/libs/Directory.Build.props +++ b/src/libs/Directory.Build.props @@ -39,7 +39,7 @@ - 0.8.2 + 0.8.3 0.1 v dev diff --git a/src/libs/OpenApiGenerator.Core/Models/PropertyData.cs b/src/libs/OpenApiGenerator.Core/Models/PropertyData.cs index 5b68603b4a..c668252342 100644 --- a/src/libs/OpenApiGenerator.Core/Models/PropertyData.cs +++ b/src/libs/OpenApiGenerator.Core/Models/PropertyData.cs @@ -53,6 +53,11 @@ public static PropertyData FromSchema( { name = name.FixPropertyName(parents.Last().ClassName); } + if (name.Length > 0 && + char.IsDigit(name[0])) + { + name = "_" + name; + } return new PropertyData( Id: schema.Key,