Module: ViewModel::ActiveRecord::UpdateData::Schemas

Defined in:
lib/view_model/active_record/update_data.rb

Constant Summary collapse

VIEWMODEL_REFERENCE_ONLY =
JsonSchema.parse!(viewmodel_reference_only)
APPEND_ACTION =

Referenced updates are special:

- Append requires `_ref` hashes
- Update requires `_ref` hashes
- Remove requires vm refs (type/id)

Checked in code (ReferencedCollectionUpdate::Builder.parse_*_values)

JsonSchema.parse!(fupdate_owned.deep_merge(append_mixin))
REFERENCED_APPEND_ACTION =
JsonSchema.parse!(fupdate_shared.deep_merge(append_mixin))
UPDATE_ACTION =
JsonSchema.parse!(fupdate_owned.deep_merge(update_mixin))
REFERENCED_UPDATE_ACTION =
JsonSchema.parse!(fupdate_shared.deep_merge(update_mixin))
REMOVE_ACTION =
JsonSchema.parse!(fupdate_owned.deep_merge(remove_mixin))
REFERENCED_REMOVE_ACTION =
JsonSchema.parse!(fupdate_shared.deep_merge(remove_mixin))
COLLECTION_UPDATE =
JsonSchema.parse!(collection_update.(fupdate_owned))
REFERENCED_COLLECTION_UPDATE =
JsonSchema.parse!(collection_update.(fupdate_shared))