RicoSuter / NJsonSchema

JSON Schema reader, generator and validator for .NET
http://NJsonSchema.org
MIT License
1.37k stars 529 forks source link

Update PropertyNameGenerator - escape "|" character in property names #1684

Closed AntonYeurasau closed 5 months ago

AntonYeurasau commented 5 months ago

Some swagger documents contain | character in property names which is a reserved character in C# and is not valid for use in property names. This code change replaces the vertical line character | with an underscore character _ to generate a valid (according to C#) property name