Kong / Kong/insomnia

inso lint does not load custom .spectral.yml when linting API specs using --exportFile flag

Open
#7,901 0 comments 0 reactions 1 assignee Claimed by @jackkav 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

The expected behavior is that the Inso CLI should load the custom ruleset from .spectral.yaml, just as it does when linting an API spec directly. When running `inso lint spec somespec.yaml`, it is indicated in the console that the Spectral YAML is being loaded. However, this does not occur when linting with `inso lint spec --exportFile some-exportfile.json "Some API Spec identifier here`

### Actual Behavior

The Inso CLI does not use the .spectral.yaml file in the current working directory when the `--exportFile` flag is used to define an Insomnia v4 export file (Design Document).

### Reproduction Steps

1. Export a design document containing an API specification.
2. Create a `.spectral.yml` file and add custom rulesets.
3. Lint the API spec within the export file using `inso lint spec --exportFile export.json "API Spec identifier"`.
4. Check the console to see if the Spectral YAML file is being loaded.

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

9.3.3 (inso-cli)

### What operating system are you using?

Windows

### Operating System Version

Windows 01

### Installation method

Download from insomnia.rest

### Last Known Working Insomnia version

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.