@Override
    public Integer call() throws Exception {
        client = OkHttpUtils.createClient(trustAll);
        checkVersion();
        DownloadBean downloadBean = triggerExport();
        File exportJson = downloadExportJson(downloadBean);
        JsonNode rootNode = enrichWithSchema(exportJson);

        if (Files.exists(output.toPath())) {
            if (overwriteIfExists) {
                LOGGER.debug("Deleting existing file at {}", output.getAbsolutePath());
                Files.delete(output.toPath());
            } else {
                throw new FileAlreadyExistsException("File " + output.getAbsolutePath() + " already exists. "
                    + "Hint: you can use --overwrite");
            }
        }

        LOGGER.info("Writing result of enrichment to {}", output.getAbsolutePath());
        OBJECT_MAPPER.writeTree(OBJECT_MAPPER.createGenerator(output, JsonEncoding.UTF8), rootNode);
        return 0;
    }
Enrich pre-2.1.0.Final release.

Adds the missing ApiDefinition field to older Apiman export files.

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
migration-assistant/src/main/java/io/apiman/migration/fix_pre_21/EnrichPre21ExportCommand.java