@Test public void testWithInterDocumentCrossReferencesAndNoOutputPath() { Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder() .withInterDocumentCrossReferences() .build(); Swagger2MarkupConverter.SwaggerContext context = createContext(config); assertThat(new OperationDocumentNameResolver(context).apply(operation)) .isEqualTo("paths.adoc"); }
public String apply(PathOperation operation) { if (config.isSeparatedOperationsEnabled()) return new File(config.getSeparatedOperationsFolder(), markupDocBuilder.addFileExtension(normalizeName(operation.getId()))).getPath(); else return markupDocBuilder.addFileExtension(config.getPathsDocument()); }
OperationDocumentNameResolver extends OperationDocumentResolver { public String apply(PathOperation operation) { if (config.isSeparatedOperationsEnabled()) return new File(config.getSeparatedOperationsFolder(), markupDocBuilder.addFileExtension(normalizeName(operation.getId()))).getPath(); else return markupDocBuilder.addFileExtension(config.getPathsDocument()); } }
OperationDocumentNameResolver extends OperationDocumentResolver { public String apply(PathOperation operation) { if (config.isSeparatedOperationsEnabled()) return new File(config.getSeparatedOperationsFolder(), markupDocBuilder.addFileExtension(normalizeName(operation.getId()))).getPath(); else return markupDocBuilder.addFileExtension(config.getPathsDocument()); } OperationDocumentNameResolver(Swagger2MarkupConverter.SwaggerContext context); }
OperationDocumentNameResolver extends OperationDocumentResolver { public String apply(PathOperation operation) { if (config.isSeparatedOperationsEnabled()) return new File(config.getSeparatedOperationsFolder(), markupDocBuilder.addFileExtension(normalizeName(operation.getId()))).getPath(); else return markupDocBuilder.addFileExtension(config.getPathsDocument()); } OperationDocumentNameResolver(Swagger2MarkupConverter.SwaggerContext context); String apply(PathOperation operation); }
OperationDocumentNameResolver extends OperationDocumentResolver { public String apply(PathOperation operation) { if (config.isSeparatedOperationsEnabled()) return new File(config.getSeparatedOperationsFolder(), markupDocBuilder.addFileExtension(normalizeName(operation.getId()))).getPath(); else return markupDocBuilder.addFileExtension(config.getPathsDocument()); } OperationDocumentNameResolver(Swagger2MarkupConverter.SwaggerContext context); String apply(PathOperation operation);  }