class HtmlGenerator {

    public void generate() throws IOException {
        ApiModel apiModel = new ApiModelBuilder().buildApiModel(config.getSourceFile());
        TemplateEngine engine = new TemplateEngine();
        engine.setTemplateDir(config.getTemplateDir());
        String result = engine.renderTemplate("api", apiModel);

        File targetDir = new File(config.getTargetDir());
        createDirectoryIfNeeded(targetDir);
        Files.write(targetDir.toPath()
            .resolve("index.html"), result.getBytes(StandardCharsets.UTF_8));

        writeWebResources(targetDir);
    }

    public  HtmlGenerator(HtmlConfiguration config);

}