@Test public void testWithSeparatedOperationsAndInterDocumentCrossReferences() { Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder() .withSeparatedOperations() .withInterDocumentCrossReferences() .build(); Swagger2MarkupConverter.SwaggerContext context = createContext(config); context.setOutputPath(Paths.get("/tmp")); assertThat(new DefinitionDocumentResolverFromOperation(context).apply("DefinitionName")) .isEqualTo(".." + fileSeparator + "definitions.adoc"); }
public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedOperationsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + new File("..", defaultResolver).getPath(); else return defaultResolver; }
DefinitionDocumentResolverFromOperation extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedOperationsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + new File("..", defaultResolver).getPath(); else return defaultResolver; } }
DefinitionDocumentResolverFromOperation extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedOperationsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + new File("..", defaultResolver).getPath(); else return defaultResolver; } DefinitionDocumentResolverFromOperation(Swagger2MarkupConverter.SwaggerContext context); }
DefinitionDocumentResolverFromOperation extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedOperationsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + new File("..", defaultResolver).getPath(); else return defaultResolver; } DefinitionDocumentResolverFromOperation(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName); }
DefinitionDocumentResolverFromOperation extends DefinitionDocumentResolverDefault { public String apply(String definitionName) { String defaultResolver = super.apply(definitionName); if (defaultResolver != null && config.isSeparatedOperationsEnabled()) return defaultString(config.getInterDocumentCrossReferencesPrefix()) + new File("..", defaultResolver).getPath(); else return defaultResolver; } DefinitionDocumentResolverFromOperation(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName);  }