fix(importer-postman): stop swapping the API key name and its value (#643)

This commit is contained in:
Ngo Quoc Viet
2026-09-12 12:52:20 -07:00
committed by GitHub
parent c6e09a5af3
commit eff0c06cb0
3 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -294,8 +294,10 @@ function importAuth(rawAuth: unknown): Pick<HttpRequest, "authentication" | "aut
authenticationType: "apikey",
authentication: {
location: a.in === "query" ? "query" : "header",
key: a.value != null ? String(a.value) : undefined,
value: a.key != null ? String(a.key) : undefined,
// Postman's "key" is the header/parameter name and its "value" is the
// secret, matching Yaak's own apikey auth.
key: a.key != null ? String(a.key) : undefined,
value: a.value != null ? String(a.value) : undefined,
},
};
}
+2 -2
View File
@@ -659,12 +659,12 @@
},
{
"key": "value",
"value": "value",
"value": "secret-123",
"type": "string"
},
{
"key": "key",
"value": "key",
"value": "X-API-Key",
"type": "string"
}
]
+2 -2
View File
@@ -271,8 +271,8 @@
"authenticationType": "apikey",
"authentication": {
"location": "query",
"key": "value",
"value": "key"
"key": "X-API-Key",
"value": "secret-123"
}
},
{