List<String> tags = operation.getOperation().getTags();
private void buildTagsSection(MarkupDocBuilder markupDocBuilder, PathOperation operation) { if (config.getPathsGroupedBy() == GroupBy.AS_IS) { List<String> tags = operation.getOperation().getTags(); if (CollectionUtils.isNotEmpty(tags)) { buildSectionTitle(markupDocBuilder, labels.getLabel(TAGS)); if (config.getTagOrdering() != null) { tags.sort(config.getTagOrdering()); } markupDocBuilder.unorderedList(tags); } } }
private void setDefaultTag() { // if tag has been defined, do nothing if (null != operation.getTags()) { for (String tag : operation.getTags()) { if (!StringUtils.isEmpty(tag)) { return; } } } // if there is no tag, set default tag if (!swaggerGenerator.getDefaultTags().isEmpty()) { operation.setTags(new ArrayList<>(swaggerGenerator.getDefaultTags())); } }
protected void updateOperation(String[] apiConsumes, String[] apiProduces, Map<String, Tag> tags, List<SecurityRequirement> securities, Operation operation) { if (operation == null) { return; } if (operation.getConsumes() == null) { for (String mediaType : apiConsumes) { operation.consumes(mediaType); } } if (operation.getProduces() == null) { for (String mediaType : apiProduces) { operation.produces(mediaType); } } if (operation.getTags() == null) { for (String tagString : tags.keySet()) { operation.tag(tagString); } } for (SecurityRequirement security : securities) { operation.security(security); } }
private void setDefaultTag() { // if tag has been defined, do nothing if (null != operation.getTags()) { for (String tag : operation.getTags()) { if (!StringUtils.isEmpty(tag)) { return; } } } // if there is no tag, set default tag if (!swaggerGenerator.getDefaultTags().isEmpty()) { operation.setTags(new ArrayList<>(swaggerGenerator.getDefaultTags())); } }
public LinkedHashSet<String> getCommonTags(final Path path) { LinkedHashSet<String> _xblockexpression = null; { Set<String> common = null; Collection<Operation> _values = path.getOperationMap().values(); for (final Operation op : _values) { if ((common == null)) { common = Sets.<String>newHashSet(op.getTags()); } else { common.retainAll(op.getTags()); } } Collection<String> _elvis = null; if (common != null) { _elvis = common; } else { _elvis = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList()); } _xblockexpression = this.reorderTags(_elvis); } return _xblockexpression; }
List<String> tags = operation.getOperation().getTags();
private void buildTagsSection(MarkupDocBuilder markupDocBuilder, PathOperation operation) { if (config.getPathsGroupedBy() == GroupBy.AS_IS) { List<String> tags = operation.getOperation().getTags(); if (CollectionUtils.isNotEmpty(tags)) { buildSectionTitle(markupDocBuilder, labels.getLabel(TAGS)); if (config.getTagOrdering() != null) { tags.sort(config.getTagOrdering()); } markupDocBuilder.unorderedList(tags); } } }
.flatMap(o -> ofNullable(o.getTags()).orElse(Collections.emptyList()).stream().distinct())//
.flatMap(o -> o.getTags().stream().distinct())//
.flatMap(o -> o.getTags().stream().distinct())//
.flatMap(o -> SwaggerHelper.sanitizeTags(o.getTags()).distinct())//
@Override public void operation(HttpMethod httpMethod, Operation operation) { operation.setTags(fillList(operation.getTags())); operation.setParameters(fillList(operation.getParameters())); operation.setResponses(fillMap(operation.getResponses())); operation.setSchemes(fillList(operation.getSchemes())); }
.flatMap(o -> SwaggerHelper.sanitizeTags(o.getTags()))//
.descriptor(descriptor).tags(ofNullable(operation.getTags()).orElse(Collections.emptyList()))// .build();
.descriptor(descriptor).tags(SwaggerHelper.sanitizeTags(operation.getTags()).distinct()::iterator)// .build();
.descriptor(descriptor).tags(ofNullable(operation.getTags()).orElse(Collections.emptyList()))// .build();
List<String> _tags = op.getTags(); LinkedHashSet<String> _reorderTags = null; if (_tags!=null) {