rest-endpoint-conventions

โดย AgentsRoomตรวจสอบโดย AgentsRoomยังไม่มีการติดตั้งยังไม่มีการถูกใจอัปเดตเมื่อ 7 พฤษภาคม 2569หมวดหมู่: วิศวกรรม

ทำอะไรได้บ้าง

Use when adding or modifying a REST endpoint. Enforces the project's auth check, validation, error shape and pagination conventions.

การติดตั้งจะเปิดรายการนี้ในแอปเดสก์ท็อป AgentsRoom ของคุณ หากยังไม่ได้ติดตั้งแอป ระบบจะพาคุณไปยังหน้าดาวน์โหลด

SKILL.md

---
name: rest-endpoint-conventions
description: Use when adding or modifying a REST endpoint. Enforces the project's auth check, validation, error shape and pagination conventions.
---

# REST endpoint conventions

When adding or modifying a REST endpoint:

1. Auth check FIRST: 401 if unauthenticated, 403 if forbidden — never silently empty.
2. Validate the input with the project's existing validation lib (zod, joi, ...) — do not introduce a new one.
3. Errors return `{ error: "CODE", message: "<human-readable>" }`. Status codes follow REST semantics (400 / 404 / 409 / 422 / 500).
4. List endpoints paginate by default (cursor or offset, match what the project already does).
5. Side effects (emails, webhooks) fire AFTER the DB commit, never inside the transaction.

แท็ก

backendapirest

เจาะลึกเพิ่มเติม

ดาวน์โหลด AgentsRoom

รันเอเจนต์ AI ทั้งหมดของคุณในทุกโปรเจกต์ จากหน้าต่างเดียว

ฟรีดาวน์โหลด AgentsRoom

แอปคู่หู: ตรวจสอบเอเจนต์ของคุณได้ทุกที่

นำของคุณเอง: Claude, Codex, Antigravity CLI, หรือผู้ให้บริการ AI อื่น ๆ

รับส่วนขยาย
Chrome Web Store

ส่งข้อบกพร่องและคำขอไปยังแบ็คล็อกสาธารณะของคุณโดยตรง

มองเห็น AgentsRoom ในการทำงาน

หลายโปรเจกต์
ผู้ให้บริการหลายราย
หลาย agents
สถานะสด
ไฟล์ diff & commit
คู่หูมือถือ
ตัวอย่างสด
ทีมเอเจนต์
การทำงานอัตโนมัติในเบราว์เซอร์
การพัฒนาที่ขับเคลื่อนด้วย backlog
ห้องสมุดคำสั่ง
ห้องสมุดทักษะ
ดูฟีเจอร์ทั้งหมด