private static ResponseType parseType(final String name, final Type type, final int depth, final Map<TypeVariable<?>, Type> typeVariableMap) {
        ResponseType responseType = new ResponseType();
        if (StringUtils.isBlank(name)) {
            responseType.setName(type.getTypeName());
        } else {
            responseType.setName(name);
        }
        if (depth > 5) {
            responseType.setType("object");
            return responseType;
        }
        if (type instanceof Class) {
            return parseClass(responseType, (Class<?>) type, depth, typeVariableMap);
        } else if (type instanceof ParameterizedType) {
            return parseParameterizedType(responseType, (ParameterizedType) type, depth, typeVariableMap);
        } else if (type instanceof GenericArrayType) {
            return parseGenericArrayType(responseType, (GenericArrayType) type, depth, typeVariableMap);
        } else if (type instanceof TypeVariable) {
            Type actualType = typeVariableMap.get(type);
            if (Objects.nonNull(actualType)) {
                return parseType(name, actualType, depth, typeVariableMap);
            } else if (((TypeVariable<?>) type).getBounds().length > 0) {
                Type upperBound = ((TypeVariable<?>) type).getBounds()[0];
                return parseType(name, upperBound, depth, typeVariableMap);
            } else {
                responseType.setType("object");
                return responseType;
            }
        } else if (type instanceof WildcardType) {
            responseType.setType("object");
            return responseType;
        } else {
            responseType.setType("object");
            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