Kong / Kong/insomnia

OpenAPI securitySchemes authKey in:query

Open
#5,791 0 comments 0 reactions 0 assignees View on GitHub
B-bug PA-importers PA-openapi-2-kong S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

Insomnia should select the proper placement of `authKey` when importing from OpenAPI URL.

### Actual Behavior

Importing OpenAPI that contains authentication key with in=query, Insomnia chooses header as auth token location by default:

![image](https://user-images.githubusercontent.com/71898342/220407002-88dd4a9a-05a4-4fa5-9fce-7f61bced48dc.png)

```json
"components": {
"securitySchemes": {
"authKey": {
"type": "apiKey",
"name": "authKey",
"in": "query",
"description": "..."
}
}
}
```

### Reproduction Steps

_No response_

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

_No response_

### Insomnia Version

2022.7.3

### What operating system are you using?

Other Linux

### Operating System Version

N/A

### Installation method

Flatpak

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the OpenAPI import with the provided securitySchemes example and inspect where an apiKey's in value is interpreted. Done means an authKey declared with in=query is imported as a query parameter rather than as a header token.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.