package migrations
- Alphabetic
- Public
- All
Type Members
-
final
case class
FlatSchema(subschemas: SubSchemas, required: Set[SchemaPointer], parents: SubSchemas) extends Product with Serializable
An object represents flattened JSON Schema, i.e.
An object represents flattened JSON Schema, i.e. JSON Schema processed with an algorithm that unfolds nested JSON structure into sequence of typed pointers - JSON Pointers, pointing to leaf schemas - schemas that cannot be flattened further. Leaf schemas are mostly primitive values (strings, booleans etc), but also can be something that could not be flattened
This is mostly a transitive tool and should not be used by user-code and instead user should be creating *ordered* list of typed pointers from multiple schema via
FlatSchema.extractProperties
- subschemas
set of typed pointers (order should not matter at this point)
- required
keys listed in
required
property, whose parents also listed inrequired
some of parent properties still can benull
and thus not required- parents
keys that are not primitive, but can contain important information (e.g. nullability)
-
case class
Migration(vendor: String, name: String, from: Full, to: Full, diff: SchemaDiff) extends Product with Serializable
SchemaDiff with its metadata
SchemaDiff with its metadata
- vendor
vendor of a schema being changed
- name
name of a schema being changed
- from
source schema version
- to
target schema version
- diff
actuall migration data. Ordered map of added Schema properties
-
case class
SchemaDiff(added: List[(SchemaPointer, Schema)], modified: Set[Modified], removed: List[(SchemaPointer, Schema)]) extends Product with Serializable
This class represents differences between *two* Schemas.
This class represents differences between *two* Schemas. Preserves no order. The essence of Migration
- added
list of properties sorted by their appearance in JSON Schemas
- modified
list of properties changed in target Schema; if some property was added in successive Schema and modified after that, it should appear in added
- removed
set of keys removed in target Schema
-
sealed
trait
SchemaList extends Product with Serializable
Properly grouped and ordered list of schemas Core migration data structure- no valid migrations can be constructed without knowing it Schemas should always belong to the same vendor/name/model and sorted by schema-creation time (static order can be known only for unambiguous groups) and have all known versions (no gaps) Isomorphic to Iglu Core's
SchemaList
Value Members
- object FlatData
- object FlatSchema extends Serializable
- object Migration extends Serializable
- object SchemaDiff extends Serializable
- object SchemaList extends Serializable