Skip to main content

resolve_schema_reference

Function resolve_schema_reference 

Source
pub fn resolve_schema_reference<'a>(
    root_schema: &'a Value,
    schema: &'a Value,
) -> Option<&'a Value>
Expand description

Resolves the local schema reference shape emitted by schemars.

§Arguments

  • root_schema: Full root schema that owns referenced definitions.
  • schema: Schema value that may contain a local $ref.

§Returns

Returns the referenced schema when schema contains a supported reference.

§Examples

let _ = ();