protected List<DocParameter> buildDocParameters(final String ref, final JsonObject docRoot, final boolean doSubRef) {
        JsonObject responseObject = docRoot.getAsJsonObject("components").getAsJsonObject("schemas").getAsJsonObject(ref);
        JsonObject extProperties = responseObject.getAsJsonObject("properties");
        JsonArray requiredProperties = responseObject.getAsJsonArray("required");
        List<String> requiredFieldList = this.jsonArrayToStringList(requiredProperties);
        JsonObject properties = responseObject.getAsJsonObject("properties");
        List<DocParameter> docParameterList = new ArrayList<>();
        if (Objects.isNull(properties)) {
            return docParameterList;
        }
        Set<String> fieldNames = properties.keySet();
        for (String fieldName : fieldNames) {
            JsonObject fieldInfo = properties.getAsJsonObject(fieldName);
            DocParameter docParameter = GsonUtils.getInstance().fromJson(fieldInfo, DocParameter.class);
            docParameter.setName(fieldName);
            docParameter.setRequired(requiredFieldList.contains(fieldName));
            if (Objects.nonNull(extProperties)) {
                JsonObject prop = extProperties.getAsJsonObject(fieldName);
                if (Objects.nonNull(prop)) {
                    docParameter.setMaxLength(Objects.isNull(prop.get("maxLength")) ? "-" : prop.get("maxLength").getAsString());
                    if (Objects.nonNull(prop.get("required"))) {
                        docParameter.setRequired(Boolean.parseBoolean(prop.get("required").getAsString()));
                    }
                }
            }
            docParameterList.add(docParameter);
            RefInfo refInfo = this.getRefInfo(fieldInfo);
            if (Objects.nonNull(refInfo) && doSubRef) {
                String subRef = refInfo.ref;
                boolean nextDoRef = !Objects.equals(ref, subRef);
                List<DocParameter> refs = buildDocParameters(subRef, docRoot, nextDoRef);
                docParameter.setRefs(refs);
            }
        }
        return docParameterList;
    }
parseJson.

@param docRoot docRoot
@return DocInfo
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/manager/impl/SwaggerDocParser.java