fix: 修复 【github#8151】使用 postman 或者 idea 插件导入时,pathvariable 无法自带显示到 rest参数中
This commit is contained in:
parent
cfb0999bb9
commit
8eb763de03
|
@ -11,4 +11,5 @@ public class PostmanUrl {
|
||||||
private String protocol;
|
private String protocol;
|
||||||
private String port;
|
private String port;
|
||||||
private List<PostmanKeyValue> query;
|
private List<PostmanKeyValue> query;
|
||||||
|
private List<PostmanKeyValue> variable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public abstract class PostmanAbstractParserParser<T> extends ApiImportAbstractPa
|
||||||
requestDesc.getAuth(); // todo 认证方式等待优化
|
requestDesc.getAuth(); // todo 认证方式等待优化
|
||||||
PostmanUrl url = requestDesc.getUrl();
|
PostmanUrl url = requestDesc.getUrl();
|
||||||
MsHTTPSamplerProxy request = buildRequest(requestItem.getName(), url == null ? "" : url.getRaw(), requestDesc.getMethod());
|
MsHTTPSamplerProxy request = buildRequest(requestItem.getName(), url == null ? "" : url.getRaw(), requestDesc.getMethod());
|
||||||
|
request.setRest(parseKeyValue(requestDesc.getUrl().getVariable()));
|
||||||
if (StringUtils.isNotBlank(request.getPath())) {
|
if (StringUtils.isNotBlank(request.getPath())) {
|
||||||
String path = request.getPath().split("\\?")[0];
|
String path = request.getPath().split("\\?")[0];
|
||||||
path = parseVariable(path);
|
path = parseVariable(path);
|
||||||
|
|
Loading…
Reference in New Issue