home/coding/prompt-rest-api-2

Prompt Rest Api

GPTClaudeDeepSeek··1,179 copies·updated 2026-07-14
prompt-rest-api-2.prompt
# Промт — REST API сервис

> 🇷🇺 **Русский** · [🇬🇧 English](../en/prompt-rest-api.md)

[← Index](./README.md) · [Стандарты](./standards.md) · [Шаблон](./template.md)

tags: #prompt #rest-api #openapi #backend #service #single-shot
**Статус:** `🟢 Ready`
**Owner:** Pandamy619
**Последняя правка:** 2026-05-20
**Версия:** v1
**Источник идеи:** [LogicBalls — REST API Architect & Generator](https://logicballs.com/ai-prompt/prompts/rest-api-generator)
**Дельта от оригинала:** добавлены требования по idempotency для write-операций, раздел типичных ошибок дизайна и канонический блок поведения при нехватке данных.

---

## Когда использовать

- Когда нужно спроектировать новый REST API для сервиса
- Когда хочется получить не только endpoint-идеи, но и OpenAPI-совместимую структуру
- Когда нужно быстро зафиксировать versioning, auth, errors и resource model

## Что подставить

- `{{api_name}}` — string, e.g. `payments-api`
- `{{domain}}` — string, e.g. `обработка платежей и возвратов`
- `{{framework_or_language}}` — string, e.g. `FastAPI / Python 3.13` или `Spring Boot / Java 21`
- `{{auth_method}}` — enum: `jwt | oauth2 | api_key | mtls | session`
- `{{database}}` — enum: `postgres | mysql | mongodb | dynamodb | other`
- `{{business_requirements}}` — list, e.g. `создать платёж; вернуть статус; refund по идемпотентному ключу`
- `{{non_functional_requirements}}` — list, e.g. `p95 < 200ms; 99.9%; PCI DSS`

## Definition of done

Универсальный минимум — см. [Definition of done](./standards.md#2-definition-of-done).

Специфичные критерии:

- Для каждого endpoint указаны method, path, request schema, response schema, статус-коды, error model — без пропусков
- Раздел про idempotency для write-операций (POST/PUT/PATCH) реально проработан, а не сведён к одной строке
- Раздел «какие ошибки дизайна здесь наиболее вероятны» содержит как минимум 3 конкретных риска
- Приведён OpenAPI skeleton (или его эквивалент в выбранном `{{specification_format}}`), а не просто упоминание

## Промт

fill the variables

This prompt has 8 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{{api_name}{{domain}{{framework_or_language}{{auth_method}{{database}{{business_requirements}{{non_functional_requirements}{{specification_format}
Unlock with Pro →

when to use it

Community prompt sourced from the open-source GitHub repo pandamy619/Promts (MIT). A "Prompt Rest Api" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

pandamy619/Promts · MIT