Kong / Kong/insomnia

inso lint cannot run against custom spectral ruleset with "excepts" including paths

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

Description

### Expected Behavior

It lints and respects the `excepts` section in the custom ruleset.

### Actual Behavior

It fails with:

> FATAL Document must have some source assigned. If you use Spectral programmatically make sure to pass the source to Document

### Reproduction Steps

By copyting this spectral ruleset file in the same folder as the openapi.yaml file, you can produce the error:

```yaml
extends: spectral:oas

except:
"./openapi.yaml#/paths/~1v1~1cars/post/responses/202/content/application~1json/examples":
- oas3-valid-media-example

```

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

3.17.0

### What operating system are you using?

Other Linux

### Operating System Version

Docker Alpine

### Installation method

docker image

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by running `inso lint` with the reproduced custom ruleset and `openapi.yaml`, focusing on handling of the `except` path. Confirm that the command respects the specified exception without raising the missing-source fatal error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.