schema.experimental.abstract-map

Schemas representing abstract classes and subclasses

abstract-map-schema

(abstract-map-schema dispatch-key schema)
Inputs: [dispatch-key :- s/Keyword schema :- (s/pred map?)]

A schema representing an 'abstract class' map that must match at least one concrete
 subtype (indicated by the value of dispatch-key, a keyword).  Add subtypes by calling
 `extend-schema`.

extend-schema

macro

(extend-schema schema-name extensible-schema dispatch-values extension)

open-abstract-map-schema

(open-abstract-map-schema dispatch-key schema)
Inputs: [dispatch-key :- s/Keyword schema :- (s/pred map?)]

Like abstract-map-schema, but allows unknown types to validate (for, e.g. forward
 compatibility).

PExtensibleSchema

protocol

members

extend-schema!

(extend-schema! this extension schema-name dispatch-values)

sub-schemas

(sub-schemas abstract-schema)