private void convertTags(SwaggerDefinition definitionAnnotation, Swagger swagger) { if (definitionAnnotation.tags() == null) { return; } Stream<io.swagger.annotations.Tag> stream = Arrays.asList(definitionAnnotation.tags()).stream(); List<Tag> tags = stream.map(this::convertTag).collect(Collectors.toList()); swagger.setTags(tags); }
private Map<String, Tag> scanClasspathForTags() { Map<String, Tag> tags = new HashMap<>(); for (Class<?> aClass: new Reflections("").getTypesAnnotatedWith(SwaggerDefinition.class)) { SwaggerDefinition swaggerDefinition = AnnotationUtils.findAnnotation(aClass, SwaggerDefinition.class); for (io.swagger.annotations.Tag tag : swaggerDefinition.tags()) { String tagName = tag.name(); if (!tagName.isEmpty()) { tags.put(tag.name(), new Tag().name(tag.name()).description(tag.description())); } } } return tags; }
private void convertTags(SwaggerDefinition definitionAnnotation, Swagger swagger) { if (definitionAnnotation.tags() == null) { return; } Stream<io.swagger.annotations.Tag> stream = Arrays.asList(definitionAnnotation.tags()).stream(); List<Tag> tags = stream.map(this::convertTag).collect(Collectors.toList()); swagger.setTags(tags); }
for (io.swagger.annotations.Tag tagConfig : config.tags()) { if (!tagConfig.name().isEmpty()) { Tag tag = new Tag();
for (io.swagger.annotations.Tag tagConfig : config.tags()) { if (!tagConfig.name().isEmpty()) { Tag tag = new Tag();
for (io.swagger.annotations.Tag tagConfig : config.tags()) { if (StringUtils.isNotBlank(tagConfig.name())) { final Tag tag = new Tag();
for (io.swagger.annotations.Tag tagConfig : config.tags()) { if (!tagConfig.name().isEmpty()) { Tag tag = new Tag();
for (io.swagger.annotations.Tag tagConfig : config.tags()) { if (!tagConfig.name().isEmpty()) { Tag tag = new Tag();
for (io.swagger.annotations.Tag tagConfig : config.tags()) { if (!tagConfig.name().isEmpty()) { Tag tag = new Tag();