Flatten JSON Schema
Oxygen XML Editor Eclipse plugin includes a Flatten Schema
action that is available in the contextual menu when editing in JSON Schema Design mode
and in the Text mode. It allows you to flatten an entire hierarchy of JSON schemas. Starting
with the main JSON schema, Oxygen XML Editor Eclipse plugin calculates its hierarchy by processing the
$ref
keys and determining all the other referenced schema files. This means
that the flattened JSON schema is obtained by recursively adding the components of all
referenced schemas into the main one, and by updating all the $ref
keys to
point to the components from the resulting schema.
Resolving schema references is done through XML Catalogs. That means that the sub-schemas referenced through URIs and not mapped accordingly cannot not be parsed for integration into the resulting flattened schema, affecting its logic.
The Flatten Schema action opens a small dialog box that allows you to configure the operation by choosing the resulting schema name and the directory to save it, and opting whether to open the resulting schema in the editing area after the operation completes.