Change the default value of server url.

This commit is contained in:
oppofind 2020-09-29 10:13:22 +08:00
parent c3767b5333
commit b0dc00ede7
3 changed files with 29 additions and 4 deletions

View File

@ -133,7 +133,7 @@ public interface DocGlobalConstants {
String SHORT_MULTIPART_FILE_FULLY = "MultipartFile";
String DEFAULT_SERVER_URL = "http://{server}";
String DEFAULT_SERVER_URL = "";
String SHORT_REQUEST_BODY = "RequestBody";

View File

@ -198,7 +198,8 @@ public class ParamsBuildHelper {
//cover comment
CustomRespField customResponseField = responseFieldMap.get(field.getName());
String comment;
if (null != customResponseField && StringUtil.isNotEmpty(customResponseField.getDesc())) {
if (null != customResponseField && StringUtil.isNotEmpty(customResponseField.getDesc())
&& simpleName.equals(customResponseField.getOwnerClassName())) {
comment = customResponseField.getDesc();
} else {
comment = docField.getComment();
@ -428,7 +429,8 @@ public class ParamsBuildHelper {
return paramList;
}
private static void commonHandleParam(List<ApiParam> paramList, ApiParam param, String isRequired, String comment, String since, boolean strRequired) {
private static void commonHandleParam(List<ApiParam> paramList, ApiParam param, String isRequired,
String comment, String since, boolean strRequired) {
if (StringUtil.isEmpty(isRequired)) {
param.setDesc(comment).setVersion(since);
} else {

View File

@ -1,3 +1,26 @@
/*
* smart-doc
*
* Copyright (C) 2018-2020 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.power.doc.utils;
import java.util.function.BiConsumer;