@Override
    public void addDocInfo(final UpstreamInstance instance, final String docInfoJson, final String oldMd5, final Consumer<DocInfo> callback) {
        if (StringUtils.isEmpty(docInfoJson)) {
            return;
        }
        String newMd5 = DigestUtils.md5DigestAsHex(docInfoJson.getBytes(StandardCharsets.UTF_8));
        if (Objects.equals(newMd5, oldMd5)) {
            return;
        }
        DocInfo docInfo = getDocInfo(instance.getClusterName(), docInfoJson);
        if (Objects.isNull(docInfo) || CollectionUtils.isEmpty(docInfo.getDocModuleList())) {
            return;
        }
        docInfo.setDocMd5(newMd5);

        List<DocModule> docModules = docInfo.getDocModuleList();
        docModules.forEach(docModule -> docModule.getDocItems().forEach(docItem -> {
            ApiDocRegisterDTO build = ApiDocRegisterDTO.builder()
                .consume(this.getProduceConsume(docItem.getConsumes()))
                .produce(this.getProduceConsume(docItem.getProduces()))
                .httpMethod(this.getHttpMethod(docItem))
                .contextPath(docInfo.getContextPath())
                .ext(this.buildExtJson(instance, docItem))
                .document(JsonUtils.toJson(docItem))
                .rpcType(RpcTypeEnum.HTTP.getName())
                .version(API_DOC_VERSION)
                .apiDesc(docItem.getDescription())
                .tags(Collections.singletonList(docInfo.getContextPath()))
                .apiPath(docItem.getName())
                .apiSource(ApiSourceEnum.SWAGGER.getValue())
                .state(ApiStateEnum.UNPUBLISHED.getState())
                .apiOwner("admin")
                .eventType(EventType.REGISTER)
                .build();

            registerApiDocService.registerApiDocument(build);
        }));

        callback.accept(docInfo);
    }
add docInfo.

@param instance    instance
@param docInfoJson docInfoJson
@param callback    callback
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/manager/impl/DocManagerImpl.java