You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,12 +77,14 @@ npm run test:watch # Watch mode
71
77
```
72
78
73
79
**Code Quality:**
80
+
74
81
```bash
75
82
npm run lint # Check code style
76
83
npm run lint:fix # Auto-fix issues
77
84
```
78
85
79
86
**Environment Setup:**
87
+
80
88
```bash
81
89
cp .env.example .env # Create environment file
82
90
# Configure PORT (default 3000)
@@ -109,6 +117,7 @@ This codebase follows a layered REST architecture with middleware composition. K
109
117
**Error:**`{ error: { name, message } }`
110
118
111
119
HTTP Status Codes:
120
+
112
121
-`200` - Success
113
122
-`400` - Validation error
114
123
-`401` - Authentication required
@@ -123,10 +132,211 @@ For deeper technical details, see:
123
132
124
133
-`.claude/docs/architectural_patterns.md` - Design patterns, conventions, and architectural decisions used throughout the codebase
125
134
135
+
## Postman Collection Management
136
+
137
+
**IMPORTANT:** Whenever API endpoints are added, modified, or deleted, the Postman collection MUST be updated to maintain synchronization between implementation and documentation.
138
+
139
+
### When to Update Collections
140
+
141
+
After implementing endpoint changes, **ALWAYS ask the user** if they want to update the Postman collection before proceeding. Never update automatically without confirmation.
142
+
143
+
Example prompt:
144
+
145
+
```
146
+
I've completed the endpoint implementation. Would you like me to update the Postman collection
147
+
to reflect these changes?
148
+
```
149
+
150
+
### Collection Update Workflow
151
+
152
+
Follow this exact workflow when updating Postman collections:
153
+
154
+
**Step 1: Get Workspace Information**
155
+
156
+
- Ask user for workspace name (not ID initially)
157
+
- Use `mcp__postman__getWorkspaces` to search for workspaces
158
+
- Display matching workspaces and ask user to confirm the correct one
159
+
- If workspace name provided doesn't match, ask for clarification
160
+
161
+
**Step 2: Get Collection Information**
162
+
163
+
- Once workspace is confirmed, use `mcp__postman__getCollections` with the workspace ID
164
+
- Display available collections in that workspace
165
+
- Ask user to confirm which collection to update
166
+
- If collection name is ambiguous, show details and ask for confirmation
167
+
168
+
**Step 3: Read and Validate Current Collection**
169
+
170
+
- Use `mcp__postman__getCollection` with `model: "full"` parameter to retrieve complete collection data
171
+
- Review current structure, requests, and organization
172
+
- Identify which requests need to be added, updated, or removed
173
+
- Validate against the API implementation (check routes in `src/routes/` directory)
174
+
175
+
**Step 4: Prepare Updated Collection**
176
+
177
+
- Start with current collection structure
178
+
-**CRITICAL: Flatten all folders** - Extract all requests from nested folders to root level
179
+
- Remove all `item` entries that are folders (only keep request items)
180
+
- Update/add/remove requests as needed
181
+
- Ensure each request includes:
182
+
- Correct HTTP method
183
+
- Full URL with path parameters
184
+
- Request headers (including `x-api-key` for auth)
185
+
- Request body with examples
186
+
- Response examples
187
+
- Maintain collection-level auth, variables, and scripts
188
+
189
+
**Step 5: Update Collection**
190
+
191
+
-**NEVER use `mcp__postman__updateCollectionRequest`** - it is too limited
192
+
-**ALWAYS use `mcp__postman__putCollection`** instead
193
+
- Pass the complete collection object with all required fields
194
+
- Include collection ID in the request
195
+
- Ensure `info` object has required `name` and `schema` properties
196
+
197
+
**Step 6: Verify Update**
198
+
199
+
- Read the collection again using `mcp__postman__getCollection`
200
+
- Confirm changes were applied correctly
201
+
- Report success to user with summary of changes
202
+
203
+
### Critical Rules for Collection Updates
204
+
205
+
1.**No Folders Allowed**
206
+
207
+
- Collections MUST be flat (no nested folders or item groups)
208
+
- If reading a collection with folders, automatically flatten it
209
+
- Extract all requests from folders and place at root `item` array
0 commit comments