ComponentDefinition

data class ComponentDefinition(val schema: JsonObject, val allowedParents: List<String>? = null, val allowedChildren: List<String>? = null, val metadata: Metadata? = null)

A catalog's definition of one component: a JSON Schema for its properties, plus the two keywords that constrain where it may sit in the tree.

schema is the definition object verbatim, allowedParents and allowedChildren are lifted out of it for the composition check. A null list means "unconstrained", which is not the same as an empty one — "allowedParents": [] is how a component is barred from every parent.

On the way out schema wins for any key it already carries: it is the unparsed original, so re-deriving a key from the typed field could only lose what the model does not name. The typed fields supply the keys schema omits, which is what lets a definition built in Kotlin round trip at all.

Constructors

Link copied to clipboard
constructor(schema: JsonObject, allowedParents: List<String>? = null, allowedChildren: List<String>? = null, metadata: Metadata? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val schema: JsonObject