private static ResponseType parseClass(final ResponseType responseType, final Class<?> clazz, final int depth, final Map<TypeVariable<?>, Type> typeVariableMap) {
        if (clazz.isArray()) {
            responseType.setType("array");
            responseType.setRefs(Collections.singletonList(parseType("ITEMS", clazz.getComponentType(), depth + 1, typeVariableMap)));
            return responseType;
        } else if (clazz.isEnum()) {
            responseType.setType("string");
            return responseType;
        } else if (isBooleanType(clazz)) {
            responseType.setType("boolean");
            return responseType;
        } else if (isIntegerType(clazz)) {
            responseType.setType("integer");
            return responseType;
        } else if (isNumberType(clazz)) {
            responseType.setType("number");
            return responseType;
        } else if (isStringType(clazz)) {
            responseType.setType("string");
            return responseType;
        } else if (isDateType(clazz)) {
            responseType.setType("date");
            return responseType;
        } else {
            List<ResponseType> refs = new ArrayList<>();
            for (Field field : clazz.getDeclaredFields()) {
                if (Modifier.isStatic(field.getModifiers())) {
                    continue;
                }
                refs.add(parseType(field.getName(), field.getGenericType(), depth + 1, typeVariableMap));
            }
            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