Skip to content

Commit

Permalink
Handle ampersand sign in properties names (#1517)
Browse files Browse the repository at this point in the history
* Update CSharpPropertyNameGenerator.cs

Added ampersand sign (&) replacement in name generator.

* Update CSharpPropertyNameGenerator.cs

Co-authored-by: Rico Suter <mail@rsuter.com>
  • Loading branch information
seruss and RicoSuter committed May 8, 2022
1 parent d3f648e commit 0dd030d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public virtual string Generate(JsonSchemaProperty property)
.Replace("*", "Star")
.Replace(":", "_")
.Replace("-", "_")
.Replace("#", "_");
.Replace("#", "_")
.Replace("&", "And");
}
}
}

0 comments on commit 0dd030d

Please sign in to comment.