推错了 我的锅

This commit is contained in:
xingzi 2019-10-12 15:48:35 +08:00
parent 8b812efcf4
commit 9ca2f8a2ad
1 changed files with 11 additions and 3 deletions

View File

@ -266,9 +266,17 @@ public class SourceBuilder {
apiMethodDoc.setResponseParams(responseParams);
//reduce create in template
apiMethodDoc.setHeaders(createHeaders(this.headers, this.isAdoc));
List<ApiReqHeader> allApiReqHeaders = Stream.of(this.headers,apiReqHeaders)
.flatMap(Collection::stream)
.collect(Collectors.toList());
List<ApiReqHeader> allApiReqHeaders;
if(this.headers!=null){
allApiReqHeaders = Stream.of(this.headers,apiReqHeaders)
.flatMap(Collection::stream)
.collect(Collectors.toList());
}
else
{
allApiReqHeaders = apiReqHeaders;
}
apiMethodDoc.setRequestHeaders(allApiReqHeaders);
methodDocList.add(apiMethodDoc);