generate_api
Generate API functions with async/await pattern in a Nuxt 4 codebase. Define name, path, and HTTP methods to create server endpoints.
Instructions
Generate API functions in the target Nuxt 4 codebase. Creates a new API file with async/await pattern.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the API (e.g., 'user', 'products') | |
| relativePath | Yes | Relative path in target (e.g., 'api/users.ts') | |
| module | No | Optional module name to prefix path (e.g., 'deals', 'tickets') | |
| targetPath | No | Optional absolute target path override | |
| methods | No | HTTP methods to generate (get, post, put, delete) |