Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
3ab7383b
Commit
3ab7383b
authored
3 years ago
by
AnAngle
Browse files
Options
Download
Email Patches
Plain Diff
refactor: 请求头加描述
parent
07797ec3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java
+0
-1
.../metersphere/api/dto/definition/parse/Swagger3Parser.java
backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java
+3
-0
...java/io/metersphere/api/service/ApiDefinitionService.java
frontend/src/business/components/api/definition/components/ApiKeyValue.vue
+9
-1
...ness/components/api/definition/components/ApiKeyValue.vue
frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue
+1
-1
...definition/components/request/http/ApiHttpRequestForm.vue
with
13 additions
and
3 deletions
+13
-3
backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java
+
0
-
1
View file @
3ab7383b
...
...
@@ -16,7 +16,6 @@ import io.metersphere.api.service.ApiModuleService;
import
io.metersphere.base.domain.ApiDefinitionWithBLOBs
;
import
io.metersphere.base.domain.ApiModule
;
import
io.metersphere.commons.exception.MSException
;
import
io.metersphere.commons.json.JSONSchemaGenerator
;
import
io.metersphere.commons.utils.CommonBeanFactory
;
import
io.metersphere.commons.utils.LogUtil
;
import
io.metersphere.commons.utils.XMLUtils
;
...
...
This diff is collapsed.
Click to expand it.
backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java
+
3
-
0
View file @
3ab7383b
...
...
@@ -537,6 +537,7 @@ public class ApiDefinitionService {
apiDefinition
.
setModuleId
(
sameRequest
.
get
(
0
).
getModuleId
());
apiDefinition
.
setModulePath
(
sameRequest
.
get
(
0
).
getModulePath
());
apiDefinition
.
setNum
(
sameRequest
.
get
(
0
).
getNum
());
//id 不变
apiDefinition
.
setOrder
(
sameRequest
.
get
(
0
).
getOrder
());
apiDefinitionMapper
.
updateByPrimaryKeyWithBLOBs
(
apiDefinition
);
apiDefinition
.
setRequest
(
request
);
importApiCase
(
apiDefinition
,
apiTestCaseMapper
,
apiTestImportRequest
,
false
);
...
...
@@ -553,6 +554,7 @@ public class ApiDefinitionService {
if
(
StringUtils
.
equalsAnyIgnoreCase
(
apiDefinition
.
getProtocol
(),
RequestType
.
TCP
))
{
String
request
=
setImportTCPHashTree
(
apiDefinition
);
}
apiDefinition
.
setOrder
(
sameRequest
.
get
(
0
).
getOrder
());
apiDefinitionMapper
.
updateByPrimaryKeyWithBLOBs
(
apiDefinition
);
}
...
...
@@ -640,6 +642,7 @@ public class ApiDefinitionService {
apiTestCase
.
setPriority
(
sameCase
.
getPriority
());
apiTestCase
.
setCreateUserId
(
sameCase
.
getCreateUserId
());
apiTestCase
.
setNum
(
sameCase
.
getNum
());
apiTestCase
.
setOrder
(
sameCase
.
getOrder
());
apiTestCase
.
setProjectId
(
sameCase
.
getProjectId
());
apiTestCase
.
setVersion
((
sameCase
.
getVersion
()
==
null
?
0
:
sameCase
.
getVersion
())
+
1
);
apiTestCaseMapper
.
updateByPrimaryKeySelective
(
apiTestCase
);
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/api/definition/components/ApiKeyValue.vue
+
9
-
1
View file @
3ab7383b
...
...
@@ -47,6 +47,13 @@
</el-autocomplete>
</div>
</el-col>
<el-col
class=
"item"
v-if=
"showDesc"
>
<el-input
v-model=
"item.description"
size=
"small"
maxlength=
"200"
:placeholder=
"$t('commons.description')"
show-word-limit
>
</el-input>
</el-col>
<el-col
class=
"item kv-delete"
>
<el-button
size=
"mini"
class=
"el-icon-delete-solid"
circle
@
click=
"remove(index)"
:disabled=
"isDisable(index) || isReadOnly"
/>
...
...
@@ -84,7 +91,8 @@
needMock
:
{
type
:
Boolean
,
default
:
false
}
},
showDesc
:
Boolean
},
data
()
{
return
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue
+
1
-
1
View file @
3ab7383b
...
...
@@ -17,7 +17,7 @@
<el-row>
<el-link
class=
"ms-el-link"
@
click=
"batchAdd"
style=
"color: #783887"
>
{{
$t
(
"
commons.batch_add
"
)
}}
</el-link>
</el-row>
<ms-api-key-value
:is-read-only=
"isReadOnly"
:isShowEnable=
"isShowEnable"
:suggestions=
"headerSuggestions"
:items=
"headers"
:need-mock=
"true"
/>
<ms-api-key-value
:show-desc=
"true"
:is-read-only=
"isReadOnly"
:isShowEnable=
"isShowEnable"
:suggestions=
"headerSuggestions"
:items=
"headers"
:need-mock=
"true"
/>
</el-tab-pane>
<!--query 参数-->
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment