private void buildProducesSection(MarkupDocBuilder markupDocBuilder, List<String> produces) { if (isNotEmpty(produces)) { producesComponent.apply(markupDocBuilder, ProducesComponent.parameters(produces, SECTION_TITLE_LEVEL)); } }
private void buildProducesSection(MarkupDocBuilder markupDocBuilder, PathOperation operation) { List<String> produces = operation.getOperation().getProduces(); if (CollectionUtils.isNotEmpty(produces)) { producesComponent.apply(markupDocBuilder, ProducesComponent.parameters(produces, getSectionTitleLevel())); } }
@Test public void testProducesComponent() throws URISyntaxException { List<String> produces = new ArrayList<>(); produces.add("application/json"); produces.add("application/xml"); Swagger2MarkupConverter.Context context = createContext(); MarkupDocBuilder markupDocBuilder = context.createMarkupDocBuilder(); markupDocBuilder = new ProducesComponent(context) .apply(markupDocBuilder, ProducesComponent.parameters(produces, OverviewDocument.SECTION_TITLE_LEVEL)); markupDocBuilder.writeToFileWithoutExtension(outputDirectory, StandardCharsets.UTF_8); Path expectedFile = getExpectedFile(COMPONENT_NAME); DiffUtils.assertThatFileIsEqual(expectedFile, outputDirectory, getReportName(COMPONENT_NAME)); } }
private void buildProducesSection(MarkupDocBuilder markupDocBuilder, List<String> produces) { if (isNotEmpty(produces)) { producesComponent.apply(markupDocBuilder, ProducesComponent.parameters(produces, SECTION_TITLE_LEVEL)); } }
private void buildProducesSection(MarkupDocBuilder markupDocBuilder, List<String> produces) { if (isNotEmpty(produces)) { producesComponent.apply(markupDocBuilder, ProducesComponent.parameters(produces, SECTION_TITLE_LEVEL)); } }
private void buildProducesSection(MarkupDocBuilder markupDocBuilder, PathOperation operation) { List<String> produces = operation.getOperation().getProduces(); if (CollectionUtils.isNotEmpty(produces)) { producesComponent.apply(markupDocBuilder, ProducesComponent.parameters(produces, getSectionTitleLevel())); } }