Skip to content

Commit

Permalink
Merge pull request #932 from RSuter/master
Browse files Browse the repository at this point in the history
Release v9.13.26
  • Loading branch information
RicoSuter authored Mar 20, 2019
2 parents d4f150b + 613a2bc commit c6b2b20
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net451</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>9.13.25</Version>
<Version>9.13.26</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2018</Copyright>
<PackageLicenseUrl>https://github.com/rsuter/NJsonSchema/blob/master/LICENSE.md</PackageLicenseUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net451</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>9.13.25</Version>
<Version>9.13.26</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2018</Copyright>
<PackageLicenseUrl>https://github.com/rsuter/NJsonSchema/blob/master/LICENSE.md</PackageLicenseUrl>
Expand Down
6 changes: 6 additions & 0 deletions src/NJsonSchema.CodeGeneration/DefaultEnumNameGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public class DefaultEnumNameGenerator : IEnumNameGenerator
/// <returns>The enumeration name.</returns>
public string Generate(int index, string name, object value, JsonSchema4 schema)
{
if (string.IsNullOrEmpty(name))
{
return "Empty";
}

if (name.StartsWith("_-"))
{
name = "__" + name.Substring(2);
Expand All @@ -27,6 +32,7 @@ public string Generate(int index, string name, object value, JsonSchema4 schema)
return ConversionUtilities.ConvertToUpperCamelCase(name
.Replace(":", "-").Replace(@"""", @""), true)
.Replace(".", "_")
.Replace(",", "_")
.Replace("#", "_")
.Replace("-", "_")
.Replace("\\", "_");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net451</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>9.13.25</Version>
<Version>9.13.26</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2018</Copyright>
<PackageLicenseUrl>https://github.com/rsuter/NJsonSchema/blob/master/LICENSE.md</PackageLicenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/NJsonSchema.Yaml/NJsonSchema.Yaml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net45</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>9.13.25</Version>
<Version>9.13.26</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2018</Copyright>
<PackageLicenseUrl>https://github.com/rsuter/NJsonSchema/blob/master/LICENSE.md</PackageLicenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/NJsonSchema/NJsonSchema.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.0;netstandard2.0;net40;net45</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>9.13.25</Version>
<Version>9.13.26</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2018</Copyright>
<PackageLicenseUrl>https://github.com/rsuter/NJsonSchema/blob/master/LICENSE.md</PackageLicenseUrl>
Expand Down

0 comments on commit c6b2b20

Please sign in to comment.