Skip to main content

valid-insomnia-syntax

Overview

This rule belongs to the insomnia-validation ruleset and states that:

The provided Insomnia file must not contain any syntax/semantic issues and use only valid JSON/YAML. Each property in the file must have a type as defined in the standard.

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageProvided Insomnia file is not valid.
CodeINSOMNIA_V001
TypeValidation
Rule SystemSemantic
Broad CategoryBasic Structure
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsinsomnia semantic validation syntax

Suggested Fixes

  • Try exporting your file from the Insomnia application again.
  • If you've obtained the Insomnia file from a 3rd party tool, try importing it into an Insomnia application first and then export it again.
  • Ensure that the file uses valid JSON or YAML.
  • Ensure that each element in the Insomnia file has the expected type.
  • If you've used environment variables, ensure that a corresponding value for each variable is defined in each environment's data.
  • Ensure that an array is not defined as an object or vice versa.
  • Ensure that where a number is expected, a string value is not provided, etc.
  • For objects, ensure that each property has a correct type assigned to it.

For More Information