codingbuddy-rules 4.5.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai-rules/adapters/aider.md +374 -0
- package/.ai-rules/adapters/antigravity.md +6 -6
- package/.ai-rules/adapters/claude-code.md +68 -4
- package/.ai-rules/adapters/codex.md +5 -5
- package/.ai-rules/adapters/cursor.md +2 -2
- package/.ai-rules/adapters/kiro.md +8 -8
- package/.ai-rules/adapters/opencode.md +7 -7
- package/.ai-rules/adapters/q.md +2 -2
- package/.ai-rules/adapters/windsurf.md +395 -0
- package/.ai-rules/agents/README.md +66 -16
- package/.ai-rules/agents/accessibility-specialist.json +8 -1
- package/.ai-rules/agents/act-mode.json +8 -1
- package/.ai-rules/agents/agent-architect.json +14 -7
- package/.ai-rules/agents/ai-ml-engineer.json +7 -0
- package/.ai-rules/agents/architecture-specialist.json +7 -0
- package/.ai-rules/agents/auto-mode.json +10 -2
- package/.ai-rules/agents/backend-developer.json +7 -0
- package/.ai-rules/agents/code-quality-specialist.json +7 -0
- package/.ai-rules/agents/code-reviewer.json +86 -64
- package/.ai-rules/agents/data-engineer.json +14 -7
- package/.ai-rules/agents/data-scientist.json +16 -9
- package/.ai-rules/agents/devops-engineer.json +7 -0
- package/.ai-rules/agents/documentation-specialist.json +7 -0
- package/.ai-rules/agents/eval-mode.json +30 -19
- package/.ai-rules/agents/event-architecture-specialist.json +7 -0
- package/.ai-rules/agents/frontend-developer.json +7 -0
- package/.ai-rules/agents/i18n-specialist.json +8 -1
- package/.ai-rules/agents/integration-specialist.json +7 -0
- package/.ai-rules/agents/migration-specialist.json +7 -0
- package/.ai-rules/agents/mobile-developer.json +8 -10
- package/.ai-rules/agents/observability-specialist.json +7 -0
- package/.ai-rules/agents/parallel-orchestrator.json +352 -0
- package/.ai-rules/agents/performance-specialist.json +7 -0
- package/.ai-rules/agents/plan-mode.json +9 -1
- package/.ai-rules/agents/plan-reviewer.json +211 -0
- package/.ai-rules/agents/platform-engineer.json +7 -0
- package/.ai-rules/agents/security-engineer.json +15 -8
- package/.ai-rules/agents/security-specialist.json +8 -1
- package/.ai-rules/agents/seo-specialist.json +7 -0
- package/.ai-rules/agents/software-engineer.json +7 -0
- package/.ai-rules/agents/solution-architect.json +17 -10
- package/.ai-rules/agents/systems-developer.json +15 -8
- package/.ai-rules/agents/technical-planner.json +17 -10
- package/.ai-rules/agents/test-engineer.json +13 -6
- package/.ai-rules/agents/test-strategy-specialist.json +7 -0
- package/.ai-rules/agents/tooling-engineer.json +10 -3
- package/.ai-rules/agents/ui-ux-designer.json +7 -0
- package/.ai-rules/keyword-modes.json +4 -4
- package/.ai-rules/rules/clarification-guide.md +14 -14
- package/.ai-rules/rules/core.md +73 -0
- package/.ai-rules/rules/parallel-execution.md +217 -0
- package/.ai-rules/schemas/agent.schema.json +38 -0
- package/.ai-rules/skills/README.md +29 -1
- package/.ai-rules/skills/agent-design/SKILL.md +5 -0
- package/.ai-rules/skills/agent-design/examples/agent-template.json +55 -0
- package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
- package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
- package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
- package/.ai-rules/skills/api-design/SKILL.md +5 -0
- package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
- package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
- package/.ai-rules/skills/build-fix/SKILL.md +234 -0
- package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
- package/.ai-rules/skills/context-management/SKILL.md +1 -0
- package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
- package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
- package/.ai-rules/skills/database-migration/SKILL.md +1 -0
- package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
- package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
- package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
- package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
- package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
- package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
- package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
- package/.ai-rules/skills/git-master/SKILL.md +358 -0
- package/.ai-rules/skills/incident-response/SKILL.md +1 -0
- package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
- package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
- package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
- package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +198 -0
- package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
- package/.ai-rules/skills/onboard/SKILL.md +150 -0
- package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
- package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
- package/.ai-rules/skills/plan-to-issues/SKILL.md +318 -0
- package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
- package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
- package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
- package/.ai-rules/skills/pr-review/SKILL.md +4 -0
- package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
- package/.ai-rules/skills/refactoring/SKILL.md +1 -0
- package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
- package/.ai-rules/skills/retrospective/SKILL.md +192 -0
- package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
- package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
- package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
- package/.ai-rules/skills/security-audit/SKILL.md +4 -0
- package/.ai-rules/skills/ship/SKILL.md +242 -0
- package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
- package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
- package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
- package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
- package/.ai-rules/skills/skill-creator/assets/eval_review.html +568 -0
- package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
- package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
- package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
- package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
- package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
- package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
- package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
- package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
- package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
- package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
- package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
- package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
- package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
- package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
- package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
- package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
- package/bin/cli.js +170 -0
- package/lib/init/detect-stack.js +162 -0
- package/lib/init/generate-config.js +31 -0
- package/lib/init/index.js +86 -0
- package/lib/init/prompt.js +60 -0
- package/lib/init/scaffold.js +67 -0
- package/lib/init/suggest-agent.js +57 -0
- package/package.json +10 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Standard API error response examples. Use these as templates for consistent error formatting.",
|
|
3
|
+
|
|
4
|
+
"validation_error": {
|
|
5
|
+
"status": 400,
|
|
6
|
+
"body": {
|
|
7
|
+
"error": {
|
|
8
|
+
"code": "VALIDATION_ERROR",
|
|
9
|
+
"message": "Invalid input data",
|
|
10
|
+
"details": [
|
|
11
|
+
{
|
|
12
|
+
"field": "email",
|
|
13
|
+
"message": "Must be a valid email address",
|
|
14
|
+
"code": "INVALID_FORMAT"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"field": "name",
|
|
18
|
+
"message": "Name is required",
|
|
19
|
+
"code": "REQUIRED"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"field": "age",
|
|
23
|
+
"message": "Must be between 1 and 150",
|
|
24
|
+
"code": "OUT_OF_RANGE"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"meta": {
|
|
29
|
+
"requestId": "req_abc123",
|
|
30
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"unauthorized": {
|
|
36
|
+
"status": 401,
|
|
37
|
+
"body": {
|
|
38
|
+
"error": {
|
|
39
|
+
"code": "UNAUTHORIZED",
|
|
40
|
+
"message": "Authentication is required to access this resource"
|
|
41
|
+
},
|
|
42
|
+
"meta": {
|
|
43
|
+
"requestId": "req_def456",
|
|
44
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
"forbidden": {
|
|
50
|
+
"status": 403,
|
|
51
|
+
"body": {
|
|
52
|
+
"error": {
|
|
53
|
+
"code": "FORBIDDEN",
|
|
54
|
+
"message": "You do not have permission to perform this action",
|
|
55
|
+
"details": [
|
|
56
|
+
{
|
|
57
|
+
"field": "role",
|
|
58
|
+
"message": "Requires 'admin' role",
|
|
59
|
+
"code": "INSUFFICIENT_PERMISSIONS"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"meta": {
|
|
64
|
+
"requestId": "req_ghi789",
|
|
65
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"not_found": {
|
|
71
|
+
"status": 404,
|
|
72
|
+
"body": {
|
|
73
|
+
"error": {
|
|
74
|
+
"code": "NOT_FOUND",
|
|
75
|
+
"message": "The requested resource was not found"
|
|
76
|
+
},
|
|
77
|
+
"meta": {
|
|
78
|
+
"requestId": "req_jkl012",
|
|
79
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
"conflict": {
|
|
85
|
+
"status": 409,
|
|
86
|
+
"body": {
|
|
87
|
+
"error": {
|
|
88
|
+
"code": "CONFLICT",
|
|
89
|
+
"message": "A resource with this identifier already exists",
|
|
90
|
+
"details": [
|
|
91
|
+
{
|
|
92
|
+
"field": "email",
|
|
93
|
+
"message": "An account with this email already exists",
|
|
94
|
+
"code": "DUPLICATE"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"meta": {
|
|
99
|
+
"requestId": "req_mno345",
|
|
100
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
"rate_limited": {
|
|
106
|
+
"status": 429,
|
|
107
|
+
"headers": {
|
|
108
|
+
"Retry-After": "60",
|
|
109
|
+
"X-RateLimit-Limit": "100",
|
|
110
|
+
"X-RateLimit-Remaining": "0",
|
|
111
|
+
"X-RateLimit-Reset": "1705312260"
|
|
112
|
+
},
|
|
113
|
+
"body": {
|
|
114
|
+
"error": {
|
|
115
|
+
"code": "RATE_LIMITED",
|
|
116
|
+
"message": "Too many requests. Please retry after 60 seconds."
|
|
117
|
+
},
|
|
118
|
+
"meta": {
|
|
119
|
+
"requestId": "req_pqr678",
|
|
120
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
"internal_error": {
|
|
126
|
+
"status": 500,
|
|
127
|
+
"body": {
|
|
128
|
+
"error": {
|
|
129
|
+
"code": "INTERNAL_ERROR",
|
|
130
|
+
"message": "An unexpected error occurred. Please try again later."
|
|
131
|
+
},
|
|
132
|
+
"meta": {
|
|
133
|
+
"requestId": "req_stu901",
|
|
134
|
+
"timestamp": "2024-01-15T10:30:00Z"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
"_error_code_registry": {
|
|
140
|
+
"_comment": "Machine-readable error codes used across the API. Keep this list updated.",
|
|
141
|
+
"codes": {
|
|
142
|
+
"VALIDATION_ERROR": "Request body or parameters failed validation",
|
|
143
|
+
"UNAUTHORIZED": "Missing or invalid authentication credentials",
|
|
144
|
+
"FORBIDDEN": "Valid credentials but insufficient permissions",
|
|
145
|
+
"NOT_FOUND": "Requested resource does not exist",
|
|
146
|
+
"CONFLICT": "Request conflicts with current server state",
|
|
147
|
+
"RATE_LIMITED": "Client exceeded rate limit quota",
|
|
148
|
+
"INTERNAL_ERROR": "Unexpected server-side failure",
|
|
149
|
+
"SERVICE_UNAVAILABLE": "Upstream dependency is unavailable",
|
|
150
|
+
"REQUIRED": "A required field is missing",
|
|
151
|
+
"INVALID_FORMAT": "Field value does not match expected format",
|
|
152
|
+
"OUT_OF_RANGE": "Numeric value outside allowed range",
|
|
153
|
+
"DUPLICATE": "Value must be unique but already exists",
|
|
154
|
+
"INSUFFICIENT_PERMISSIONS": "Specific permission check failed",
|
|
155
|
+
"EXPIRED": "Token or resource has expired",
|
|
156
|
+
"IMMUTABLE": "Attempted to modify a read-only field"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# OpenAPI 3.1 Template
|
|
2
|
+
# Copy and adapt this template when creating new API specifications.
|
|
3
|
+
# Replace all placeholder values (marked with <angle-brackets>).
|
|
4
|
+
|
|
5
|
+
openapi: 3.1.0
|
|
6
|
+
info:
|
|
7
|
+
title: <Service Name> API
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
description: |
|
|
10
|
+
<Brief description of what this API does and who it serves.>
|
|
11
|
+
contact:
|
|
12
|
+
name: <Team Name>
|
|
13
|
+
email: <team@example.com>
|
|
14
|
+
|
|
15
|
+
servers:
|
|
16
|
+
- url: https://api.example.com/v1
|
|
17
|
+
description: Production
|
|
18
|
+
- url: https://api-staging.example.com/v1
|
|
19
|
+
description: Staging
|
|
20
|
+
|
|
21
|
+
# ──────────────────────────────────────────
|
|
22
|
+
# Paths
|
|
23
|
+
# ──────────────────────────────────────────
|
|
24
|
+
|
|
25
|
+
paths:
|
|
26
|
+
/items:
|
|
27
|
+
get:
|
|
28
|
+
summary: List items
|
|
29
|
+
operationId: listItems
|
|
30
|
+
tags: [Items]
|
|
31
|
+
parameters:
|
|
32
|
+
- $ref: '#/components/parameters/PageParam'
|
|
33
|
+
- $ref: '#/components/parameters/PageSizeParam'
|
|
34
|
+
- name: status
|
|
35
|
+
in: query
|
|
36
|
+
description: Filter by item status
|
|
37
|
+
schema:
|
|
38
|
+
type: string
|
|
39
|
+
enum: [active, archived, draft]
|
|
40
|
+
- name: search
|
|
41
|
+
in: query
|
|
42
|
+
description: Full-text search across name and description
|
|
43
|
+
schema:
|
|
44
|
+
type: string
|
|
45
|
+
maxLength: 200
|
|
46
|
+
responses:
|
|
47
|
+
'200':
|
|
48
|
+
description: Paginated list of items
|
|
49
|
+
content:
|
|
50
|
+
application/json:
|
|
51
|
+
schema:
|
|
52
|
+
$ref: '#/components/schemas/ItemListResponse'
|
|
53
|
+
'401':
|
|
54
|
+
$ref: '#/components/responses/Unauthorized'
|
|
55
|
+
|
|
56
|
+
post:
|
|
57
|
+
summary: Create an item
|
|
58
|
+
operationId: createItem
|
|
59
|
+
tags: [Items]
|
|
60
|
+
requestBody:
|
|
61
|
+
required: true
|
|
62
|
+
content:
|
|
63
|
+
application/json:
|
|
64
|
+
schema:
|
|
65
|
+
$ref: '#/components/schemas/CreateItemRequest'
|
|
66
|
+
responses:
|
|
67
|
+
'201':
|
|
68
|
+
description: Item created
|
|
69
|
+
headers:
|
|
70
|
+
Location:
|
|
71
|
+
description: URL of the newly created item
|
|
72
|
+
schema:
|
|
73
|
+
type: string
|
|
74
|
+
format: uri
|
|
75
|
+
content:
|
|
76
|
+
application/json:
|
|
77
|
+
schema:
|
|
78
|
+
$ref: '#/components/schemas/ItemResponse'
|
|
79
|
+
'400':
|
|
80
|
+
$ref: '#/components/responses/ValidationError'
|
|
81
|
+
'401':
|
|
82
|
+
$ref: '#/components/responses/Unauthorized'
|
|
83
|
+
'409':
|
|
84
|
+
$ref: '#/components/responses/Conflict'
|
|
85
|
+
|
|
86
|
+
/items/{itemId}:
|
|
87
|
+
parameters:
|
|
88
|
+
- name: itemId
|
|
89
|
+
in: path
|
|
90
|
+
required: true
|
|
91
|
+
description: Unique item identifier
|
|
92
|
+
schema:
|
|
93
|
+
type: string
|
|
94
|
+
format: uuid
|
|
95
|
+
|
|
96
|
+
get:
|
|
97
|
+
summary: Get an item by ID
|
|
98
|
+
operationId: getItem
|
|
99
|
+
tags: [Items]
|
|
100
|
+
responses:
|
|
101
|
+
'200':
|
|
102
|
+
description: Item details
|
|
103
|
+
content:
|
|
104
|
+
application/json:
|
|
105
|
+
schema:
|
|
106
|
+
$ref: '#/components/schemas/ItemResponse'
|
|
107
|
+
'404':
|
|
108
|
+
$ref: '#/components/responses/NotFound'
|
|
109
|
+
|
|
110
|
+
patch:
|
|
111
|
+
summary: Update an item
|
|
112
|
+
operationId: updateItem
|
|
113
|
+
tags: [Items]
|
|
114
|
+
requestBody:
|
|
115
|
+
required: true
|
|
116
|
+
content:
|
|
117
|
+
application/json:
|
|
118
|
+
schema:
|
|
119
|
+
$ref: '#/components/schemas/UpdateItemRequest'
|
|
120
|
+
responses:
|
|
121
|
+
'200':
|
|
122
|
+
description: Item updated
|
|
123
|
+
content:
|
|
124
|
+
application/json:
|
|
125
|
+
schema:
|
|
126
|
+
$ref: '#/components/schemas/ItemResponse'
|
|
127
|
+
'400':
|
|
128
|
+
$ref: '#/components/responses/ValidationError'
|
|
129
|
+
'404':
|
|
130
|
+
$ref: '#/components/responses/NotFound'
|
|
131
|
+
'409':
|
|
132
|
+
$ref: '#/components/responses/Conflict'
|
|
133
|
+
|
|
134
|
+
delete:
|
|
135
|
+
summary: Delete an item
|
|
136
|
+
operationId: deleteItem
|
|
137
|
+
tags: [Items]
|
|
138
|
+
responses:
|
|
139
|
+
'204':
|
|
140
|
+
description: Item deleted
|
|
141
|
+
'404':
|
|
142
|
+
$ref: '#/components/responses/NotFound'
|
|
143
|
+
|
|
144
|
+
# ──────────────────────────────────────────
|
|
145
|
+
# Components
|
|
146
|
+
# ──────────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
components:
|
|
149
|
+
# --- Schemas ---
|
|
150
|
+
|
|
151
|
+
schemas:
|
|
152
|
+
Item:
|
|
153
|
+
type: object
|
|
154
|
+
required: [id, name, status, createdAt, updatedAt]
|
|
155
|
+
properties:
|
|
156
|
+
id:
|
|
157
|
+
type: string
|
|
158
|
+
format: uuid
|
|
159
|
+
description: Unique identifier
|
|
160
|
+
examples: ['550e8400-e29b-41d4-a716-446655440000']
|
|
161
|
+
name:
|
|
162
|
+
type: string
|
|
163
|
+
minLength: 1
|
|
164
|
+
maxLength: 255
|
|
165
|
+
description: Display name
|
|
166
|
+
description:
|
|
167
|
+
type: string
|
|
168
|
+
maxLength: 2000
|
|
169
|
+
description: Detailed description
|
|
170
|
+
status:
|
|
171
|
+
type: string
|
|
172
|
+
enum: [active, archived, draft]
|
|
173
|
+
description: Current item status
|
|
174
|
+
createdAt:
|
|
175
|
+
type: string
|
|
176
|
+
format: date-time
|
|
177
|
+
updatedAt:
|
|
178
|
+
type: string
|
|
179
|
+
format: date-time
|
|
180
|
+
|
|
181
|
+
CreateItemRequest:
|
|
182
|
+
type: object
|
|
183
|
+
required: [name]
|
|
184
|
+
properties:
|
|
185
|
+
name:
|
|
186
|
+
type: string
|
|
187
|
+
minLength: 1
|
|
188
|
+
maxLength: 255
|
|
189
|
+
description:
|
|
190
|
+
type: string
|
|
191
|
+
maxLength: 2000
|
|
192
|
+
status:
|
|
193
|
+
type: string
|
|
194
|
+
enum: [active, draft]
|
|
195
|
+
default: draft
|
|
196
|
+
|
|
197
|
+
UpdateItemRequest:
|
|
198
|
+
type: object
|
|
199
|
+
minProperties: 1
|
|
200
|
+
properties:
|
|
201
|
+
name:
|
|
202
|
+
type: string
|
|
203
|
+
minLength: 1
|
|
204
|
+
maxLength: 255
|
|
205
|
+
description:
|
|
206
|
+
type: string
|
|
207
|
+
maxLength: 2000
|
|
208
|
+
status:
|
|
209
|
+
type: string
|
|
210
|
+
enum: [active, archived, draft]
|
|
211
|
+
|
|
212
|
+
ItemResponse:
|
|
213
|
+
type: object
|
|
214
|
+
required: [data, meta]
|
|
215
|
+
properties:
|
|
216
|
+
data:
|
|
217
|
+
$ref: '#/components/schemas/Item'
|
|
218
|
+
meta:
|
|
219
|
+
$ref: '#/components/schemas/ResponseMeta'
|
|
220
|
+
|
|
221
|
+
ItemListResponse:
|
|
222
|
+
type: object
|
|
223
|
+
required: [data, meta]
|
|
224
|
+
properties:
|
|
225
|
+
data:
|
|
226
|
+
type: array
|
|
227
|
+
items:
|
|
228
|
+
$ref: '#/components/schemas/Item'
|
|
229
|
+
meta:
|
|
230
|
+
allOf:
|
|
231
|
+
- $ref: '#/components/schemas/ResponseMeta'
|
|
232
|
+
- $ref: '#/components/schemas/PaginationMeta'
|
|
233
|
+
|
|
234
|
+
# --- Shared Schemas ---
|
|
235
|
+
|
|
236
|
+
ResponseMeta:
|
|
237
|
+
type: object
|
|
238
|
+
required: [requestId, timestamp]
|
|
239
|
+
properties:
|
|
240
|
+
requestId:
|
|
241
|
+
type: string
|
|
242
|
+
format: uuid
|
|
243
|
+
description: Unique request trace ID
|
|
244
|
+
timestamp:
|
|
245
|
+
type: string
|
|
246
|
+
format: date-time
|
|
247
|
+
|
|
248
|
+
PaginationMeta:
|
|
249
|
+
type: object
|
|
250
|
+
required: [total, page, pageSize, hasNext]
|
|
251
|
+
properties:
|
|
252
|
+
total:
|
|
253
|
+
type: integer
|
|
254
|
+
minimum: 0
|
|
255
|
+
page:
|
|
256
|
+
type: integer
|
|
257
|
+
minimum: 1
|
|
258
|
+
pageSize:
|
|
259
|
+
type: integer
|
|
260
|
+
minimum: 1
|
|
261
|
+
maximum: 100
|
|
262
|
+
hasNext:
|
|
263
|
+
type: boolean
|
|
264
|
+
|
|
265
|
+
ErrorResponse:
|
|
266
|
+
type: object
|
|
267
|
+
required: [error, meta]
|
|
268
|
+
properties:
|
|
269
|
+
error:
|
|
270
|
+
type: object
|
|
271
|
+
required: [code, message]
|
|
272
|
+
properties:
|
|
273
|
+
code:
|
|
274
|
+
type: string
|
|
275
|
+
description: Machine-readable error code
|
|
276
|
+
examples: ['VALIDATION_ERROR']
|
|
277
|
+
message:
|
|
278
|
+
type: string
|
|
279
|
+
description: Human-readable error message
|
|
280
|
+
details:
|
|
281
|
+
type: array
|
|
282
|
+
items:
|
|
283
|
+
type: object
|
|
284
|
+
required: [message]
|
|
285
|
+
properties:
|
|
286
|
+
field:
|
|
287
|
+
type: string
|
|
288
|
+
message:
|
|
289
|
+
type: string
|
|
290
|
+
code:
|
|
291
|
+
type: string
|
|
292
|
+
meta:
|
|
293
|
+
$ref: '#/components/schemas/ResponseMeta'
|
|
294
|
+
|
|
295
|
+
# --- Parameters ---
|
|
296
|
+
|
|
297
|
+
parameters:
|
|
298
|
+
PageParam:
|
|
299
|
+
name: page
|
|
300
|
+
in: query
|
|
301
|
+
description: Page number (1-indexed)
|
|
302
|
+
schema:
|
|
303
|
+
type: integer
|
|
304
|
+
minimum: 1
|
|
305
|
+
default: 1
|
|
306
|
+
|
|
307
|
+
PageSizeParam:
|
|
308
|
+
name: pageSize
|
|
309
|
+
in: query
|
|
310
|
+
description: Items per page
|
|
311
|
+
schema:
|
|
312
|
+
type: integer
|
|
313
|
+
minimum: 1
|
|
314
|
+
maximum: 100
|
|
315
|
+
default: 20
|
|
316
|
+
|
|
317
|
+
# --- Responses ---
|
|
318
|
+
|
|
319
|
+
responses:
|
|
320
|
+
ValidationError:
|
|
321
|
+
description: Input validation failed
|
|
322
|
+
content:
|
|
323
|
+
application/json:
|
|
324
|
+
schema:
|
|
325
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
326
|
+
example:
|
|
327
|
+
error:
|
|
328
|
+
code: VALIDATION_ERROR
|
|
329
|
+
message: Invalid input data
|
|
330
|
+
details:
|
|
331
|
+
- field: name
|
|
332
|
+
message: Name is required
|
|
333
|
+
code: REQUIRED
|
|
334
|
+
meta:
|
|
335
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
336
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
337
|
+
|
|
338
|
+
NotFound:
|
|
339
|
+
description: Resource not found
|
|
340
|
+
content:
|
|
341
|
+
application/json:
|
|
342
|
+
schema:
|
|
343
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
344
|
+
example:
|
|
345
|
+
error:
|
|
346
|
+
code: NOT_FOUND
|
|
347
|
+
message: The requested resource was not found
|
|
348
|
+
meta:
|
|
349
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
350
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
351
|
+
|
|
352
|
+
Unauthorized:
|
|
353
|
+
description: Authentication required
|
|
354
|
+
content:
|
|
355
|
+
application/json:
|
|
356
|
+
schema:
|
|
357
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
358
|
+
example:
|
|
359
|
+
error:
|
|
360
|
+
code: UNAUTHORIZED
|
|
361
|
+
message: Authentication is required
|
|
362
|
+
meta:
|
|
363
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
364
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
365
|
+
|
|
366
|
+
Conflict:
|
|
367
|
+
description: State conflict (duplicate or version mismatch)
|
|
368
|
+
content:
|
|
369
|
+
application/json:
|
|
370
|
+
schema:
|
|
371
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
372
|
+
example:
|
|
373
|
+
error:
|
|
374
|
+
code: CONFLICT
|
|
375
|
+
message: An item with this name already exists
|
|
376
|
+
meta:
|
|
377
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
378
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
379
|
+
|
|
380
|
+
# --- Security ---
|
|
381
|
+
|
|
382
|
+
securitySchemes:
|
|
383
|
+
BearerAuth:
|
|
384
|
+
type: http
|
|
385
|
+
scheme: bearer
|
|
386
|
+
bearerFormat: JWT
|
|
387
|
+
|
|
388
|
+
security:
|
|
389
|
+
- BearerAuth: []
|
|
390
|
+
|
|
391
|
+
tags:
|
|
392
|
+
- name: Items
|
|
393
|
+
description: Item management endpoints
|