fix: use proper values for addTo field when auth type is api-key (#3966)
This commit is contained in:
@@ -260,7 +260,7 @@ const resolveOpenAPIV3SecurityObj = (
|
||||
return {
|
||||
authType: "api-key",
|
||||
authActive: true,
|
||||
addTo: "Headers",
|
||||
addTo: "HEADERS",
|
||||
key: scheme.name,
|
||||
value: "",
|
||||
}
|
||||
@@ -268,7 +268,7 @@ const resolveOpenAPIV3SecurityObj = (
|
||||
return {
|
||||
authType: "api-key",
|
||||
authActive: true,
|
||||
addTo: "Query params",
|
||||
addTo: "QUERY_PARAMS",
|
||||
key: scheme.in,
|
||||
value: "",
|
||||
}
|
||||
@@ -430,7 +430,7 @@ const resolveOpenAPIV2SecurityScheme = (
|
||||
// V2 only supports in: header and in: query
|
||||
return {
|
||||
authType: "api-key",
|
||||
addTo: scheme.in === "header" ? "Headers" : "Query params",
|
||||
addTo: scheme.in === "header" ? "HEADERS" : "QUERY_PARAMS",
|
||||
authActive: true,
|
||||
key: scheme.name,
|
||||
value: "",
|
||||
|
||||
@@ -150,8 +150,8 @@ const getHoppReqAuth = (item: Item): HoppRESTAuth => {
|
||||
),
|
||||
addTo:
|
||||
(getVariableValue(auth.apikey, "in") ?? "query") === "query"
|
||||
? "Query params"
|
||||
: "Headers",
|
||||
? "QUERY_PARAMS"
|
||||
: "HEADERS",
|
||||
}
|
||||
} else if (auth.type === "bearer") {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user