defaultValue = DEFAULT_URI) URI source,
@Flag(tag = "dialect", help = "The source dialect to use", defaultValue = "js") String dialect,
@Flag(tag = "out", help = "The directory to generate source into", defaultValue = ".") File out)
throws IOException {
Unpacker unpacker = FlatPack.create(new Configuration()
.addTypeSource(new SearchTypeSource("com.getperka.flatpack")))
.getUnpacker();
logger.info("Retrieving {}", source);
Reader reader = new InputStreamReader(source.toURL().openStream(), Charset.forName("UTF8"));
ApiDescription api = unpacker.<ApiDescription> unpack(ApiDescription.class, reader, null)
.getValue();
logger.info("Retrieved API description with {} entities and {} endpoints", api.getEntities()
.size(), api.getEndpoints().size());
ServiceLoader<Dialect> loader = ServiceLoader.load(Dialect.class);