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", authenticationType: "apikey",
authentication: { authentication: {
location: a.in === "query" ? "query" : "header", location: a.in === "query" ? "query" : "header",
key: a.value != null ? String(a.value) : undefined, // Postman's "key" is the header/parameter name and its "value" is the
value: a.key != null ? String(a.key) : undefined, // 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", "key": "value",
"value": "value", "value": "secret-123",
"type": "string" "type": "string"
}, },
{ {
"key": "key", "key": "key",
"value": "key", "value": "X-API-Key",
"type": "string" "type": "string"
} }
] ]
+2 -2
View File
@@ -271,8 +271,8 @@
"authenticationType": "apikey", "authenticationType": "apikey",
"authentication": { "authentication": {
"location": "query", "location": "query",
"key": "value", "key": "X-API-Key",
"value": "key" "value": "secret-123"
} }
}, },
{ {