Instantly share code, notes, and snippets.

anonymous /generate asciidocs
Created Oct 25, 2016

Embed
What would you like to do?
def jsonFile = new File("/path/to/swagger.json")
// Create config for swagger2markup.
Map<String, String> config = ["swagger2markup.pathsGroupedBy": "TAGS"]
Swagger2MarkupConfig swagger2MarkupConfig = new Swagger2MarkupConfigBuilder(config).build()
Swagger2MarkupConverter converter = Swagger2MarkupConverter.from(URIUtils.create(jsonFile.absolutePath)) (1)
.withConfig(swagger2MarkupConfig) (2)
.build() (3)
.toFolder("/path/to/save/asciidocs") (4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment