@Test public void testWithInterDocumentCrossReferences() { Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder() .withInterDocumentCrossReferences() .build(); Swagger2MarkupConverter.SwaggerContext context = createContext(config); context.setOutputPath(Paths.get("/tmp")); assertThat(new DefinitionDocumentResolverFromDefinition(context).apply("DefinitionName")) .isEqualTo("definitions.adoc"); }
public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedDefinitionsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(normalizeName(definitionName)); else return defaultResolver; }
DefinitionDocumentResolverFromDefinition extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedDefinitionsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(normalizeName(definitionName)); else return defaultResolver; } }
DefinitionDocumentResolverFromDefinition extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedDefinitionsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(normalizeName(definitionName)); else return defaultResolver; } DefinitionDocumentResolverFromDefinition(Swagger2MarkupConverter.SwaggerContext context); }
DefinitionDocumentResolverFromDefinition extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedDefinitionsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(normalizeName(definitionName)); else return defaultResolver; } DefinitionDocumentResolverFromDefinition(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName); }
DefinitionDocumentResolverFromDefinition extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedDefinitionsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(normalizeName(definitionName)); else return defaultResolver; } DefinitionDocumentResolverFromDefinition(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName);  }