use of org.structr.schema.json.JsonSchema in project structr by structr.
the class DeployCommand method exportSchema.
private void exportSchema(final Path target) throws FrameworkException {
logger.info("Exporting schema");
try {
final JsonSchema schema = StructrSchema.createFromDatabase(StructrApp.getInstance());
try (final Writer writer = new FileWriter(target.toFile())) {
writer.append(schema.toString());
writer.append("\n");
writer.flush();
} catch (IOException ioex) {
logger.warn("", ioex);
}
} catch (Throwable t) {
t.printStackTrace();
}
}
Aggregations