@Test public void testWithInterDocumentCrossReferences() { Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder() .withInterDocumentCrossReferences() .build(); Swagger2MarkupConverter.SwaggerContext context = createContext(config); context.setOutputPath(Paths.get("/tmp")); assertThat(new SecurityDocumentResolver(context).apply("petstore_auth")) .isEqualTo("security.adoc"); }
public String apply(String definitionName) { if (!config.isInterDocumentCrossReferencesEnabled() || context.getOutputPath() == null) return null; else return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(config.getSecurityDocument()); }
SecurityDocumentResolver extends DocumentResolver { public String apply(String definitionName) { if (!config.isInterDocumentCrossReferencesEnabled() || context.getOutputPath() == null) return null; else return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(config.getSecurityDocument()); } }
SecurityDocumentResolver extends DocumentResolver { public String apply(String definitionName) { if (!config.isInterDocumentCrossReferencesEnabled() || context.getOutputPath() == null) return null; else return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(config.getSecurityDocument()); } SecurityDocumentResolver(Swagger2MarkupConverter.SwaggerContext context); }
SecurityDocumentResolver extends DocumentResolver { public String apply(String definitionName) { if (!config.isInterDocumentCrossReferencesEnabled() || context.getOutputPath() == null) return null; else return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(config.getSecurityDocument()); } SecurityDocumentResolver(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName); }
SecurityDocumentResolver extends DocumentResolver { public String apply(String definitionName) { if (!config.isInterDocumentCrossReferencesEnabled() || context.getOutputPath() == null) return null; else return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(config.getSecurityDocument()); } SecurityDocumentResolver(Swagger2MarkupConverter.SwaggerContext context); String apply(String definitionName);  }