Skip to main content
This rule enforces that the params export in Gadget action files only uses supported JSON schema types and properties. Gadget supports a limited subset of JSON schema for parameter validation.

Rule Details

This rule validates that parameter definitions:
  • Use only supported types: string, number, integer, boolean, array, object
  • Use only supported properties (mostly just type)
  • For object types, can include properties and additionalProperties
  • Are defined as object literals, not strings or variables
Supported types:
  • "string"
  • "number"
  • "integer"
  • "boolean"
  • "array"
  • "object"
Supported properties:
  • type (required for all parameters)
  • properties (object types only)
  • additionalProperties (object types only, must be boolean)
Severity: Error Auto-fixable: No

Examples

Incorrect

Correct

Common Issues

Validation properties not supported

JSON schema validation properties like minLength, maxLength, minimum, maximum, pattern, format, etc. are not supported:

Array items not configurable

The items property for arrays is not supported:
While Gadget only supports basic type validation in the params export, you can perform custom validation in your action code using libraries like Zod or Yup.

When to Use

This rule is included in the recommended config and should always be enabled for Gadget projects. It prevents configuration that Gadget cannot parse or will ignore.