private static ResponseType parseParameterizedType(final ResponseType responseType, final ParameterizedType type, final int depth, final Map<TypeVariable<?>, Type> typeVariableMap) {
        Class<?> rawType = (Class<?>) type.getRawType();
        Type[] actualTypeArguments = type.getActualTypeArguments();
        TypeVariable<?>[] typeVariables = rawType.getTypeParameters();
        Map<TypeVariable<?>, Type> newTypeVariableMap = new HashMap<>(typeVariableMap);
        for (int i = 0; i < typeVariables.length; i++) {
            newTypeVariableMap.put(typeVariables[i], actualTypeArguments[i]);
        }
        if (Collection.class.isAssignableFrom(rawType)) {
            Type actualType = actualTypeArguments[0];
            ResponseType elementParam = parseType("ITEMS", actualType, depth + 1, newTypeVariableMap);
            responseType.setRefs(Collections.singletonList(elementParam));
            responseType.setType("array");
            return responseType;
        } else if (Map.class.isAssignableFrom(rawType)) {
            Type keyType = actualTypeArguments[0];
            Type valueType = actualTypeArguments[1];
            ResponseType keyParam = parseType("key", keyType, depth + 1, newTypeVariableMap);
            ResponseType valueParam = parseType("value", valueType, depth + 1, newTypeVariableMap);
            List<ResponseType> children = new ArrayList<>();
            children.add(keyParam);
            children.add(valueParam);
            responseType.setRefs(children);
            responseType.setType("map");
            return responseType;
        } else {
            List<ResponseType> refs = new ArrayList<>();
            for (Field field : rawType.getDeclaredFields()) {
                if (Modifier.isStatic(field.getModifiers())) {
                    continue;
                }
                ResponseType fieldParam = parseType(field.getName(), field.getGenericType(), depth + 1, newTypeVariableMap);
                refs.add(fieldParam);
            }
            responseType.setType("object");
            responseType.setRefs(refs);
            return responseType;
        }
    }
Perhaps a better way is to generate API documentation through OpenAPI annotations.

@param method the method
@return return type
shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/utils/OpenApiUtils.java