> ## Documentation Index
> Fetch the complete documentation index at: https://gadget.aurelienbbn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# action-no-invalid-params

> Enforce that Gadget action params export only uses supported JSON schema types and properties.

| Recommended                                | Strict                                     | Auto-fixable                                | Scope               |
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------- | ------------------- |
| <Badge color="red" size="sm">error</Badge> | <Badge color="red" size="sm">error</Badge> | <Badge color="gray" size="sm">false</Badge> | Gadget action files |

<Tip>
  Related Gadget documentation: [Gadget docs](https://docs.gadget.dev/guides/actions/code#adding-parameters-to-actions)
</Tip>

**What the linter reports:**

* "additionalProperties" for "`name`" must be true or false.
* Parameter "`name`" must define a type (`supportedTypes`).
* Parameter "`name`" must be an object with a "type" property.
* "properties" for "`name`" must be an object literal.
* "type" for "`name`" must be a string literal.
* Parameter "`name`" uses unsupported type "`type`". Supported: `supportedTypes`.
* Parameter "`name`" uses unsupported property "`property`".

## Examples

<Tabs>
  <Tab title="Incorrect">
    ```ts title="api/models/widget/actions/create.ts" theme={null}
    export const params = {
      // "date" is not a supported type - use "string", "number", "boolean", or "object"
      name: { type: "date" },
    };
    ```
  </Tab>

  <Tab title="Correct">
    ```ts title="api/models/widget/actions/create.ts" theme={null}
    export const params = {
      // supported types: "string", "number", "boolean", "object"
      name: { type: "string" },
    };
    ```
  </Tab>
</Tabs>
