本文整理汇总了Java中io.github.robwin.markup.builder.MarkupLanguage类的典型用法代码示例。如果您正苦于以下问题:Java MarkupLanguage类的具体用法?Java MarkupLanguage怎么用?Java MarkupLanguage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MarkupLanguage类属于io.github.robwin.markup.builder包,在下文中一共展示了MarkupLanguage类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: convertSwaggerToAsciiDoc
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
public void convertSwaggerToAsciiDoc() throws Exception {
assertThat(dockets, is(notNullValue()));
assertThat(dockets, hasSize(greaterThan(0)));
dockets.stream()
.map(Docket::getGroupName)
.forEach(groupName -> {
String urlTemplate = String.format("/v2/api-docs?group=%s", groupName);
String outputDirectory = String.format("build/docs/swagger/generated/%s", groupName);
try {
this.mockMvc.perform(get(urlTemplate).accept(MediaType.APPLICATION_JSON))
.andDo(print())
.andDo(Swagger2MarkupResultHandler.outputDirectory(outputDirectory)
.withMarkupLanguage(MarkupLanguage.ASCIIDOC)
.build())
.andExpect(status().isOk());
} catch (Exception e) {
throw new RuntimeException(e);
}
});
}
开发者ID:amvnetworks,项目名称:amv-access-api-poc,代码行数:24,代码来源:SwaggerRestApiDocumentation.java
示例2: convertRemoteSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
public void convertRemoteSwaggerToMarkdown() throws IOException {
Swagger2MarkupConverter.from("http://localhost:8080/v2/api-docs")
.withMarkupLanguage(MarkupLanguage.MARKDOWN).build()
.intoFolder("src/docs/markdown/generated");
// Then validate that three Markdown files have been created
String[] files = new File("src/docs/markdown/generated").list();
System.out.println(files.length);
}
开发者ID:Ellixo,项目名称:MedicamentDB,代码行数:11,代码来源:Swagger2MarkupTest.java
示例3: convertSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
public void convertSwaggerToMarkdown() throws Exception {
this.mockMvc.perform(get("/v2/api-docs")
.accept(MediaType.APPLICATION_JSON))
.andDo(Swagger2MarkupResultHandler.outputDirectory("src/docs/markdown/generated")
.withMarkupLanguage(MarkupLanguage.MARKDOWN).build())
.andExpect(status().isOk());
}
开发者ID:BBVA,项目名称:mirrorgate,代码行数:9,代码来源:SwaggerToMarkupTest.java
示例4: convertSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
public void convertSwaggerToMarkdown() throws Exception {
this.mockMvc.perform(get("/v2/api-docs?group=customer")
.accept(MediaType.APPLICATION_JSON).characterEncoding("utf-8"))
.andDo(Swagger2MarkupResultHandlerUtf8.outputDirectory("src/docs/markdown/generated")
.withMarkupLanguage(MarkupLanguage.MARKDOWN).build())
.andExpect(status().isOk());
}
开发者ID:catinred2,项目名称:swagger_test,代码行数:9,代码来源:Swagger2MarkupTest.java
示例5: convertSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
public void convertSwaggerToMarkdown() throws Exception {
this.mockMvc.perform(get("/v2/api-docs?group=customer")
.accept(MediaType.APPLICATION_JSON).characterEncoding("utf-8"))
.andDo(Swagger2MarkupResultHandlerUtf8.outputDirectory("target/docs/markdown/generated")
.withMarkupLanguage(MarkupLanguage.MARKDOWN).build())
.andExpect(status().isOk());
}
开发者ID:catinred2,项目名称:swagger_test,代码行数:9,代码来源:Swagger2MarkupTest2.java
示例6: convertSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
public void convertSwaggerToMarkdown() throws Exception {
this.mockMvc.perform(get("/v2/api-docs")
.accept(MediaType.APPLICATION_JSON))
.andDo(Swagger2MarkupResultHandler.outputDirectory("target/docs/markdown/generated")
.withMarkupLanguage(MarkupLanguage.MARKDOWN).build())
.andExpect(status().isOk());
}
开发者ID:fastnsilver,项目名称:xlator,代码行数:9,代码来源:Swagger2MarkupTest.java
示例7: convertRemoteSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
@Test
@Ignore public void convertRemoteSwaggerToMarkdown() throws IOException {
// Remote Swagger source
// Markdown
Swagger2MarkupConverter.from("http://localhost:4024/api-docs").withMarkupLanguage(MarkupLanguage.MARKDOWN).build().intoFolder("src/docs/markdown/generated");
// Then validate that three Markdown files have been created
String[] files = new File("src/docs/markdown/generated").list();
assertTrue(Arrays.asList(files).contains("definitions.md"));
assertTrue(Arrays.asList(files).contains("overview.md"));
assertTrue(Arrays.asList(files).contains("paths.md"));
}
开发者ID:osiris-indoor,项目名称:osiris,代码行数:15,代码来源:Swagger2MarkupTest.java
示例8: convertSwaggerToMarkdown
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
public static void convertSwaggerToMarkdown(final String swaggerJsonUrlString,
final String targetFolderPath)
throws IOException {
Swagger2MarkupConverter.from(swaggerJsonUrlString)
.withMarkupLanguage(MarkupLanguage.MARKDOWN)
.withPathsGroupedBy(GroupBy.TAGS)
.withDefinitionsOrderedBy(OrderBy.NATURAL)
.build()
.intoFolder(targetFolderPath);
}
开发者ID:saalfeldlab,项目名称:render,代码行数:13,代码来源:Swagger2Markdown.java
示例9: Swagger2MarkupResultHandlerUtf8
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
Swagger2MarkupResultHandlerUtf8(String outputDir, MarkupLanguage markupLanguage, String examplesFolderPath) {
this.outputDir = outputDir;
this.markupLanguage = markupLanguage;
this.examplesFolderPath = examplesFolderPath;
}
开发者ID:catinred2,项目名称:swagger_test,代码行数:6,代码来源:Swagger2MarkupResultHandlerUtf8.java
示例10: MarkupDocument
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
MarkupDocument(Swagger swagger, MarkupLanguage markupLanguage){
this.swagger = swagger;
this.markupLanguage = markupLanguage;
this.markupDocBuilder = MarkupDocBuilders.documentBuilder(markupLanguage);
}
开发者ID:buremba,项目名称:swagger-slate,代码行数:6,代码来源:MarkupDocument.java
示例11: withMarkupLanguage
import io.github.robwin.markup.builder.MarkupLanguage; //导入依赖的package包/类
/**
* Specifies the markup language which should be used to generate the files
*
* @param markupLanguage the markup language which is used to generate the files
* @return the Swagger2MarkupConverter.Builder
*/
public Builder withMarkupLanguage(MarkupLanguage markupLanguage) {
this.markupLanguage = markupLanguage;
return this;
}
开发者ID:catinred2,项目名称:swagger_test,代码行数:11,代码来源:Swagger2MarkupResultHandlerUtf8.java
注:本文中的io.github.robwin.markup.builder.MarkupLanguage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论