Open paulomorgado opened 10 months ago
This doesnt work because now there is not only one JsonSchemaGeneratorSettings but two:
The NewtonsoftJsonJsonSchemaGeneratorSettings and SystemTextJsonJsonSchemaGeneratorSettings which both inherit from JsonSchemaGeneratorSettings... this is why there is this breaking change anyway, and also why this is part of the major version change...
there are quite a few other breaking changes also in NJS that in the end backward compat will not be available anyway.
I saw that.
The main issue here is that JsonSchemaGeneratorSettings
's members are not virtual
and there's no way proxying them.
Since this is not possible, it's, probably, too much effort to keep source compatibility when binary compatibility is not possible.
On the other hand, it would guide the user on how to change the source code.
This breaking change introduced in v14 is a binary breaking change that forces all components using this to be upgraded.
I see 2 issues here:
SchemaSettings
property (of typeJsonSchemaGeneratorSettings
).OpenApiDocumentGeneratorSettings
no longer extendsJsonSchemaGeneratorSettings
.A nice to have obsolescence plan would be to:
OpenApiDocumentGeneratorSettings
extendingJsonSchemaGeneratorSettings
.SchemaSettings
property onOpenApiDocumentGeneratorSettings
.ObsoleteAttribute
withIsError
set tofalse
to the obsolete APIs.IsError
on theObsoleteAttribute
totrue
.JsonSchemaGeneratorSettings
base class.Note: I haven't evaluated the feasibility of keeping the
JsonSchemaGeneratorSettings
base class.