Skip to main content

Module plugin_schemas

Module plugin_schemas 

Source
Expand description

Re-export of fresh_core::plugin_schemas so editor-side modules can address it via crate::plugin_schemas::... without a deeper refactor. The actual logic lives in fresh-core because the plugin runtime needs to call the validators synchronously from JS bindings.

Functions§

deep_merge_under
Deep-merge defaults UNDER target — i.e. fill in keys that target does not already have. Used to seed plugins.<name>.settings from registered schema defaults without clobbering values the user has already saved.
defaults_from_schema
Extract default values from a schema recursively, walking properties.<name>.default. Returns an object with defaults filled in for every property that declares one.
validate_plugin_schema
Validate a plugin-supplied JSON Schema. Returns Ok(()) if safe to merge into the host’s runtime schema tree; otherwise an error describing why.