Programování Pokročilý Claude

API design s REST best practices

Návrh RESTful API s dokumentací a error handling.

Prompt text

Délka: Střední
Navrhni RESTful API pro [USE CASE]. Zahrň:

**Endpoints:**
Pro každý endpoint:
- HTTP method: [GET/POST/PUT/PATCH/DELETE]
- Path: /api/v1/[resource]
- Description
- Request:
- Headers
- Body schema (JSON)
- Query parameters
- Response:
- Success (200/201/204)
- Error (400/401/403/404/500)
- Response schema

**Authentication:**
- Typ: [JWT/OAuth2/API Key]
- Implementation

**Error Handling:**
- Standard error format
- Error codes

**Pagination:**
- Strategy (offset/cursor)
- Response format

**Rate Limiting:**
- Limits
- Headers

**Versioning:**
Strategie (URL/header)

**Documentation:**
OpenAPI/Swagger spec

Tech stack: [STACK].
Interaktivní tvůrce

Příklad použití

Vstup:

Navrhni API pro task management app. Use case: CRUD operations na tasks, projects, users. Stack: Node.js + Express. Auth: JWT.

Výstup:

Complete API design: 15 endpoints (GET /api/v1/tasks, POST /api/v1/tasks, GET /api/v1/tasks/:id, PATCH /api/v1/tasks/:id, DELETE...), každý s request/response schemas, JWT auth s Bearer token, standardized error format {error, message, code}, cursor pagination, rate limit 1000 req/hour, versioning v URL, complete OpenAPI 3.0 spec. Security: input validation, SQL injection prevention, CORS config.

Kde použít tento prompt?

Najděte vhodné AI nástroje pro použití tohoto promptu a maximalizujte jeho efektivitu.

Objevte další AI prompty

Prozkoumejte naši sbírku Programování promptů a najděte ty, které vám pomohou dosáhnout lepších výsledků.