commandby atilladeniz

Api

Generate Swagger docs and TypeScript API client

Installs: 0
Used in: 1 repos
Updated: 2d ago
$npx ai-builder add command atilladeniz/api

Installs to .claude/commands/api.md

# API Generation

Regenerate Swagger documentation and TypeScript API client.

## Command

```bash
make api
```

This runs:
1. `swag init` - Generate `backend/docs/swagger.json` from Go comments
2. `orval` - Generate TypeScript hooks in `frontend/src/api/`

## When to run

- After adding/modifying Handler endpoints
- After changing Swagger comments (`@Summary`, `@Router`, etc.)
- After running `goca feature` or `goca make handler`

## Generated Files

- `backend/docs/swagger.json` - OpenAPI spec
- `frontend/src/api/endpoints/` - React Query hooks
- `frontend/src/api/models/` - TypeScript types

Quick Install

$npx ai-builder add command atilladeniz/api

Details

Type
command
Slug
atilladeniz/api
Created
6d ago