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
This make sense also in case of beeing transferred to e.g. python dateclasses because otherwise casting from a more specific to a more general base class would not be possible.
The need to allow incompatible definitions applies actually only to annotations (like title, descriptions, etc) and class methods (out-of-scope for JSON-SCHEMA). In this case, the order of superclasses becomes important, e.g.
Other then the order with allOf there's no intrument in JSON-SCHEMA to indicate primary and secundary superschemas / classes. $ref could be regarded to have a different semantics as allOf: $ref but only a single value is allowed for $ref.
The text was updated successfully, but these errors were encountered:
See also https://linkml.io/linkml/schemas/inheritance.html#mixin-classes-and-slots and https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem.
The diamond problem does not apply to JSON-SCHEMA since every schema included by
allOf
needs to be valid on the target document, meaning the following schema is invalid in any case:This make sense also in case of beeing transferred to e.g. python dateclasses because otherwise casting from a more specific to a more general base class would not be possible.
The need to allow incompatible definitions applies actually only to annotations (like title, descriptions, etc) and class methods (out-of-scope for JSON-SCHEMA). In this case, the order of superclasses becomes important, e.g.
will generate a web form with
xB
as label forx
and a code generator will createConsistently,
will result in
xB
.Other then the order with
allOf
there's no intrument in JSON-SCHEMA to indicate primary and secundary superschemas / classes.$ref
could be regarded to have a different semantics asallOf: $ref
but only a single value is allowed for$ref
.The text was updated successfully, but these errors were encountered: