修改postman数据头部默认值问题
This commit is contained in:
parent
e7e17d6771
commit
817cc4bfd6
|
@ -163,6 +163,7 @@ public class PostmanJsonBuilder {
|
|||
HeaderBean headerBean = new HeaderBean();
|
||||
headerBean.setKey(apiReqHeader.getName());
|
||||
headerBean.setName(apiReqHeader.getName());
|
||||
headerBean.setValue(apiReqHeader.getValue());
|
||||
headerBean.setDisabled(!apiReqHeader.isRequired());
|
||||
headerBean.setDescription(apiReqHeader.getDesc());
|
||||
headerBeans.add(headerBean);
|
||||
|
|
|
@ -71,6 +71,7 @@ public class SpringMVCRequestHeaderHandler {
|
|||
desc.append(comments);
|
||||
|
||||
if (requestHeaderMap.get(DocAnnotationConstants.DEFAULT_VALUE_PROP) != null) {
|
||||
apiReqHeader.setValue(StringUtil.removeQuotes((String) requestHeaderMap.get(DocAnnotationConstants.DEFAULT_VALUE_PROP)));
|
||||
desc.append("(defaultValue: ")
|
||||
.append(StringUtil.removeQuotes((String) requestHeaderMap.get(DocAnnotationConstants.DEFAULT_VALUE_PROP)))
|
||||
.append(")");
|
||||
|
|
|
@ -41,6 +41,10 @@ public class ApiReqHeader {
|
|||
* Request header type
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* request header defaultValue
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* Request header description
|
||||
*/
|
||||
|
@ -109,6 +113,15 @@ public class ApiReqHeader {
|
|||
return this;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public ApiReqHeader setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
Loading…
Reference in New Issue