Import from ZIP Archive

Import multiple JSON Schema files from a ZIP archive into a combined Mauro model.

This example demonstrates importing multiple JSON Schema files from a ZIP archive. The import command automatically detects ZIP file inputs and extracts all files matching the format's supported extensions.

ZIP archives are useful for distributing collections of related schema files or for importing file sets that contain cross-references.

  1. Run the import command with a ZIP file path as input:
    MauroImportExport.Cli import json-schema schemas.zip model.json --overwrite

    The command will:

    • Detect that schemas.zip is a ZIP archive
    • Extract all JSON files from the archive
    • Import each schema file
    • Resolve cross-schema references
    • Write the combined result to model.json
  2. To control how multiple schemas are combined, use the mode parameter:
    MauroImportExport.Cli import json-schema schemas.zip model.json --param mode=Separate

    Use --show-params to see all available parameters for controlling multi-file import behaviour.

The command imports all schema files from the ZIP archive and saves the result as a Mauro JSON model. Cross-references between schemas are preserved, and the models are combined according to the specified mode.

Tip:

ZIP archives can contain files in subdirectories. All supported files are extracted and processed regardless of their location within the archive.

Important:

Only formats that implement multi-file import support ZIP archives. Use list-formats to check if a format supports ZIP input.