fix: the request method is incorrect via swagger creation (#342)

Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
This commit is contained in:
Rick 2024-01-23 11:28:00 +08:00 committed by GitHub
parent b6b7483140
commit 642b23ab78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -173,9 +173,7 @@ const apiSpecKinds = [
]
const handleAPISelect = (item: TestCase) => {
if (testCaseForm.method === '') {
testCaseForm.method = item.request.method
}
testCaseForm.method = item.request.method
if (testCaseForm.name === '') {
testCaseForm.name = item.name
}

View File

@ -136,7 +136,7 @@ func ToGRPCTestCase(testCase testing.TestCase) (result *TestCase) {
req := &Request{
Api: testCase.Request.API,
Method: testCase.Request.Method,
// Query: mapToPair(testCase.Request.Query),
Query: mapInterToPair(testCase.Request.Query),
Header: mapToPair(testCase.Request.Header),
Form: mapToPair(testCase.Request.Form),
Body: testCase.Request.Body.String(),