@Test public void testWithInterDocumentCrossReferencesAndPrefix() { Swagger2MarkupConfig config = (Swagger2MarkupConfig) new Swagger2MarkupConfigBuilder() .withInterDocumentCrossReferences("prefix_") .build(); Swagger2MarkupConverter.SwaggerContext context = createContext(config); context.setOutputPath(Paths.get("/tmp")); assertThat(new DefinitionDocumentNameResolver(context).apply("DefinitionName")) .isEqualTo("definitions.adoc"); }
public String apply(String definitionName) { if (config.isSeparatedDefinitionsEnabled()) return new File(config.getSeparatedDefinitionsFolder(), markupDocBuilder.addFileExtension(normalizeName(definitionName))).getPath(); else return markupDocBuilder.addFileExtension(config.getDefinitionsDocument()); }
DefinitionDocumentNameResolver extends DocumentResolver { public String apply(String definitionName) { if (config.isSeparatedDefinitionsEnabled()) return new File(config.getSeparatedDefinitionsFolder(), markupDocBuilder.addFileExtension(normalizeName(definitionName))).getPath(); else return markupDocBuilder.addFileExtension(config.getDefinitionsDocument()); } }
DefinitionDocumentNameResolver extends DocumentResolver { public String apply(String definitionName) { if (config.isSeparatedDefinitionsEnabled()) return new File(config.getSeparatedDefinitionsFolder(), markupDocBuilder.addFileExtension(normalizeName(definitionName))).getPath(); else return markupDocBuilder.addFileExtension(config.getDefinitionsDocument()); } DefinitionDocumentNameResolver(Swagger2MarkupConverter.SwaggerContext context); }
DefinitionDocumentNameResolver extends DocumentResolver { public String apply(String definitionName) { if (config.isSeparatedDefinitionsEnabled()) return new File(config.getSeparatedDefinitionsFolder(), markupDocBuilder.addFileExtension(normalizeName(definitionName))).getPath(); else return markupDocBuilder.addFileExtension(config.getDefinitionsDocument()); } DefinitionDocumentNameResolver(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName); }
DefinitionDocumentNameResolver extends DocumentResolver { public String apply(String definitionName) { if (config.isSeparatedDefinitionsEnabled()) return new File(config.getSeparatedDefinitionsFolder(), markupDocBuilder.addFileExtension(normalizeName(definitionName))).getPath(); else return markupDocBuilder.addFileExtension(config.getDefinitionsDocument()); } DefinitionDocumentNameResolver(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName);  }