Skip to main content

apply_elicitation_defaults

Function apply_elicitation_defaults 

Source
pub fn apply_elicitation_defaults(
    request: &JsonObject,
    answer: &JsonObject,
) -> JsonObject
Expand description

Fills in the default of every property an accepted elicitation omitted.

SEP-1034: a client that declared elicitation.applyDefaults applies the schema’s defaults for fields the user left out, so a server receives a complete object. request is the elicitation/create params; answer is the ElicitResult the handler produced. Only an accept is touched, and only absent keys: a value the user gave is never overwritten.