RicoSuter / NJsonSchema

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

JsonSchemaGeneratorSettings made into abstract #1668

Open kotpal opened 7 months ago

kotpal commented 7 months ago

With the latest (11.0.0) NJsonSchema, JsonSchemaGeneratorSettings seems to be made into an abstract class - which is breaking any code that is creating an instance of it.

It looks like NJsonSchema.NewtonsoftJson package needs to be installed and instead of JsonSchemaGeneratorSettings NewtonsoftJsonSchemaGeneratorSettings needs to be used.

This should be better documented.

simeyla commented 6 months ago

Also NewtonsoftJsonSchemaGeneratorSettings needs to be better documented (I couldn't find it mentioned anywhere).

I'm sure I'm not the only one who updated to v14 and had a nightmarish time trying to get my Angular entities to match what I used to have now that System.Text drives the default generator. And that's because I have a lot of existing code, and the two libraries behave differently and use different attributes. It was an unnecessary source of frustration.

I had to switch to NewtonsoftJsonSchemaGeneratorSettings to preserve my sanity(!), but I had to figure that out myself from looking through the code.