swagger2markup/src/main/java/io/github/swagger2markup/internal/utils/PathUtils.java
/**
     * Converts a Swagger path into a PathOperation.
     *
     * @param path      the  path
     * @param pathModel the Swagger Path model
     * @return the path operations
     */
Converts a Swagger path into a PathOperation.
@param path      the  path
@param pathModel the Swagger Path model
@return the path operations
Converts a Swagger path into a PathOperation . @param path the path @param pathModel the Swagger Path model @return the path operations
public static List<SwaggerPathOperation> toPathOperationsList(String path, Path pathModel) {
        List<SwaggerPathOperation> pathOperations = new ArrayList<>();
        getOperationMap(pathModel).forEach((httpMethod, operation) -> {
            String id = operation.getOperationId();
            if (id == null)
                id = path + " " + httpMethod.toString().toLowerCase();
            String operationName = operation.getSummary();
            if (isBlank(operationName)) {
                operationName = httpMethod.toString() + " " + path;
            }
            pathOperations.add(new SwaggerPathOperation(httpMethod.name(), path, id, operationName, operation));
        });
        return pathOperations;
    }
public static List < SwaggerPathOperation > toPathOperationsList ( String path , Path pathModel ) { List < SwaggerPathOperation > pathOperations = new ArrayList < > ( ) ; getOperationMap ( pathModel ) . forEach ( ( httpMethod , operation ) -> { String id = operation . getOperationId ( ) ; if ( id == null ) id = path + " " + httpMethod . toString ( ) . toLowerCase ( ) ; String operationName = operation . getSummary ( ) ; if ( isBlank ( operationName ) ) { operationName = httpMethod . toString ( ) + " " + path ; } pathOperations . add ( new SwaggerPathOperation ( httpMethod . name ( ) , path , id , operationName , operation ) ) ; } ) ; return pathOperations ; }
Converts a Swagger path into a PathOperation.
Converts a Swagger path into a PathOperation .