package org.springblade.test;

import io.github.swagger2markup.Swagger2MarkupConfig;
import io.github.swagger2markup.Swagger2MarkupConverter;
import io.github.swagger2markup.builder.Swagger2MarkupConfigBuilder;
import io.github.swagger2markup.markup.builder.MarkupLanguage;

import java.net.URL;
import java.nio.file.Paths;

public class TestClass {

	public static void main(String[] args) throws Exception {
		//    输出Ascii格式
		Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder()
			.withMarkupLanguage(MarkupLanguage.ASCIIDOC)
			.build();

		Swagger2MarkupConverter.from(new URL("http://localhost:9527/v2/api-docs"))
			.withConfig(config)
			.build()
//			.toFolder(Paths.get("src/docs/asciidoc/generated"));
			.toFile(Paths.get("src/docs/asciidoc/generated/all"));
	}
}
