Kong / Kong/insomnia

path variables with special characters in openapi spec get converted to invalid regex

Open
#5,106 1 comment 1 reaction 0 assignees View on GitHub
A-encoding B-bug PA-inso PA-openapi-2-kong S-verified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

When using inso generate, the path variables should be converted to valid regex; replacing invalid characters with some other character.

### Actual Behavior

The path variables are copied as-is, including characters that would be invalid for a regex in kong.

### Reproduction Steps

- create a spec with a `-` in a path variable;
- use inso generate config
- sync the config with DeCK

### 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

I have created a pull request to solve this issue. https://github.com/Kong/insomnia/pull/5096
I am creating this issue because I don't know if you monitor pull requests.

Contributor guide

Open the contributing guide

Research direction

Start with the inso generate config path-variable handling and review pull request #5096, which the issue identifies as a proposed solution. Reproduce the case using a path variable containing a hyphen, then verify that generated regexes use valid replacements and sync successfully with DeCK.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.