std.lib.transform.allow
wrap-attr-model-allow
added in 3.0
(wrap-attr-model-allow f)wrapper function for only allowing values defined to be included
(graph/normalise {:account {:name “Chris” :age 10}} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:allow {:account {:name :checked}}}} wrappers) => (throws)
wrap-branch-model-allow
added in 3.0
(wrap-branch-model-allow f)Works together with wrap-attr-model-allow to control access to data (graph/normalise {:account/name “Chris”} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:allow {}}} wrappers) => (throws-info {:data {:name “Chris”} :key-path :account :id :not-allowed :nsv :account})
(graph/normalise {:account/name “Chris”} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:allow {:account {:name :checked}}}} wrappers) => {:account {:name “Chris”}}