Insomnia logo
  • Documentation
  • Get Started for Free
    • Introduction to Insomnia
    • Install Insomnia
    • Send Your First Request
    • Import and Export Data
    • Environment Variables
    • Insomnia Accounts
    • Forgotten Passphrase
    • Organizations
    • Enable Enterprise membership
    • Configuring EE SSO
    • Integrating Insomnia Enterprise with Okta SAML 2.0
    • Integrating Insomnia Enterprise with Microsoft Azure/Entra ID SAML 2.0
    • Insomnia Whitelisting Guide for Enterprise Users
    • Insomnia Subscriptions
    • Insomnia Subscription Management
    • Scratch Pad Tutorial
    • Requests
    • Responses
    • Request Collections
    • Request Timeouts
    • Chaining Requests
    • Post CSV Data
    • SOAP Requests
    • gRPC
    • WebSocket Support
    • Get Started with Documents
    • Design Documents
    • Linting
    • GraphQL for OpenAPI
    • Migrate from Designer
    • Unit Testing
    • Stress Testing
    • Insomnia Storage Options Guide
    • Sync with Insomnia Cloud
    • Sync with Git
    • Key Security Features
    • Security Standards
    • Signup and Authentication
    • Analytics Collected
    • End to End Data Encryption
    • Authentication
    • Client Certificates
    • Generate Code Snippet
    • Cookie Management
    • Encoding
    • GraphQL Queries
    • Run in Insomnia Button
    • Key Maps
    • Proxy
    • Introduction to Plugins
    • Context Object Reference
    • Template Tags
    • Hooks and Actions
    • Custom Themes
    • FAQ
    • Application Data
    • SSL Validation
    • Password Recovery
    • Introduction to Inso CLI
    • Install Inso CLI
    • CLI Command Reference
      • inso generate config
      • inso run test
      • inso lint spec
      • inso export spec
      • inso script
      • OpenAPI Spec Reference
      • Using Custom Linting with Inso CLI
    • Configuration
    • Inso CLI on Docker
    • Continuous Integration
    • Kong Declarative Config (for decK)
    • Kong for Kubernetes
    • Insomnia Pre-request Script Overview
    • Insomnia API Mocking Overview

inso lint spec

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.

Command

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.

Lint rules

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.

Global Flags

Option Alias Description
--output <path> -o Save the specification to a file in the working directory.
--workingDir <path>   Specify a working directory.
--src <path>   Specify the V4 export file or the Insomnia app data directory. You can use this option to set a Git data directory. If not specified, inso-cli looks for an .insomnia folder in the working directory by default.

Examples

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"
Edit this page
Report an issue
    COMPANY
  • Insomnia
  • Blog
  • Changelog
  • Pricing
  • Careers
    PRODUCTS
  • Insomnia
  • Inso (CLI)
    RESOURCES
  • Sign In
  • Documentation
  • Support
    LEGAL
  • Privacy Policy
  • Terms & Conditions
© Kong Inc. 2021