You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to inherit from a schema, add some more properties and disallow additional properties. Setting additionalProperties to false will not work combined with allOf. For that reason unevaluatedProperties was introduced, as you can see in the linked issue. But it does not seem to be implemented by njsonschema yet.
Edit: This was introduced in v8/2019-09 as far as I know.
The text was updated successfully, but these errors were encountered:
Just bumped my head against this. unevaluatedProperties is apparently supposed to solve the problem whereby you cannot use inheritance (additionalProperties = false together with allOf) so it would be great to have this implemented.
That said, JsonSchemaSettings currently has the FlattenInheritanceHierarchy member which you can set to true to work around most of these issues. I do wish the documentation around this property was better, because it defaults to false and it's critical to set it to true any time you're dealing with C# POCOs that use any form of inheritance.
What I want to do is basically this:
json-schema-org/json-schema-spec#661
I want to inherit from a schema, add some more properties and disallow additional properties. Setting additionalProperties to false will not work combined with allOf. For that reason unevaluatedProperties was introduced, as you can see in the linked issue. But it does not seem to be implemented by njsonschema yet.
Edit: This was introduced in v8/2019-09 as far as I know.
The text was updated successfully, but these errors were encountered: