swagger2markup/src/main/java/io/github/swagger2markup/internal/utils/TagUtils.java
/**
     * Groups the operations by tag. The key of the Multimap is the tag name.
     * The value of the Multimap is a PathOperation
     *
     * @param allOperations     all operations
     * @param operationOrdering comparator for operations, for a given tag
     * @return Operations grouped by Tag
     */
Groups the operations by tag. The key of the Multimap is the tag name.
The value of the Multimap is a PathOperation

@param allOperations     all operations
@param operationOrdering comparator for operations, for a given tag
@return Operations grouped by Tag
Groups the operations by tag . The key of the Multimap is the tag name . The value of the Multimap is a PathOperation @param allOperations all operations @param operationOrdering comparator for operations for a given tag @return Operations grouped by Tag
public static Multimap<String, SwaggerPathOperation> groupOperationsByTag(List<SwaggerPathOperation> allOperations, Comparator<PathOperation> operationOrdering) {
        Multimap<String, SwaggerPathOperation> operationsGroupedByTag;
        if (operationOrdering == null) {
            operationsGroupedByTag = LinkedHashMultimap.create();
        } else {
            operationsGroupedByTag = MultimapBuilder.linkedHashKeys().treeSetValues(operationOrdering).build();
        }
        for (SwaggerPathOperation operation : allOperations) {
            List<String> tags = operation.getOperation().getTags();
            Validate.notEmpty(tags, "Can't GroupBy.TAGS. Operation '%s' has no tags", operation);
            for (String tag : tags) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Added path operation '{}' to tag '{}'", operation, tag);
                }
                operationsGroupedByTag.put(tag, operation);
            }
        }
        return operationsGroupedByTag;
    }
public static Multimap < String , SwaggerPathOperation > groupOperationsByTag ( List < SwaggerPathOperation > allOperations , Comparator < PathOperation > operationOrdering ) { Multimap < String , SwaggerPathOperation > operationsGroupedByTag ; if ( operationOrdering == null ) { operationsGroupedByTag = LinkedHashMultimap . create ( ) ; } else { operationsGroupedByTag = MultimapBuilder . linkedHashKeys ( ) . treeSetValues ( operationOrdering ) . build ( ) ; } for ( SwaggerPathOperation operation : allOperations ) { List < String > tags = operation . getOperation ( ) . getTags ( ) ; Validate . notEmpty ( tags , "Can't GroupBy.TAGS. Operation '%s' has no tags" , operation ) ; for ( String tag : tags ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Added path operation '{}' to tag '{}'" , operation , tag ) ; } operationsGroupedByTag . put ( tag , operation ) ; } } return operationsGroupedByTag ; }
Groups the operations by tag.
Groups the operations by tag .