Commit 24679bc4 authored by Jérome Perrin's avatar Jérome Perrin

expandSchema: expand recursively for $ref inside object's properties

parent 2d2fbd6c
......@@ -427,9 +427,16 @@
class_definition.properties[property].$ref,
full_schema.class_definition),
full_schema);
//expanded_class_definition.properties[property] = referenced;
$.extend(expanded_class_definition.properties[property], referenced);
delete expanded_class_definition.properties[property].$ref;
} else {
if (class_definition.properties[property].type === "object") {
// no reference, but we expand anyway because we need to recurse in case there is a ref in an object property
referenced = expandSchema(
class_definition.properties[property],
full_schema);
$.extend(expanded_class_definition.properties[property], referenced);
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment