The inso lint spec
command lints and validates your OpenAPI specification. Lint results will be printed to the console, and Inso CLI will exit with an exit code. Inso CLI will exit with a non-zero exit code if linting fails.
inso lint spec [identifier]
Lint the given specification, the user will be prompted to select a specification if one is not passed as an option.
identifier
can be a specification name or id.
At the moment Inso CLI uses Spectral’s default oas
Ruleset Definition. For more information refer to the OpenAPI ruleset reference documentation.
For custom linting, refer to the Custom Linting document.
Option | Alias | Description |
---|---|---|
--output <path> |
-o | Save the specification to a file in the working directory. |
--workingDir <path> |
-w | Specify a working directory/file, to find .insomnia folder, *.db.json, export.yaml |
The following commands work when running in the example git-repo directory.
When you don’t specify any arguments, you’ll be prompted with:
inso lint spec
Scope linting by the specification name or ID:
inso lint spec spc_46c5a4
inso lint spec "Sample Specification"