Replace Postman collection with .rest file#494
Conversation
|
No actionable comments were generated in the recent review. 🎉 WalkthroughAdds a plain-text Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
rest/players.rest (1)
102-104: The{player_id}placeholder won't be resolved by REST Client.
{player_id}uses single braces while REST Client variables require double braces ({{...}}). The comment on line 103 explains the manual substitution, which is fine, but consider using REST Client's@namedirective and response body references to automate the two-step delete flow. This would make the file fully executable without manual edits.Example using REST Client response variables
### Step 1 — Look up Almada's UUID by squad number +# `@name` lookupAlmada GET {{baseUrl}}/players/squadnumber/16 Accept: application/json ### Step 2 — Delete Almada using the UUID returned above -# Replace {player_id} with the id field from the response above. -DELETE {{baseUrl}}/players/{player_id} +DELETE {{baseUrl}}/players/{{lookupAlmada.response.body.id}}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rest/players.rest` around lines 102 - 104, The DELETE request uses a single-brace placeholder "{player_id}" which REST Client won't resolve; replace it with REST Client variables and wiring (e.g., use the response naming directive from the earlier POST/GET and reference the id via the response body) so the DELETE line references the created player's id using REST Client syntax (double-brace or response variable like the named-response body reference) rather than a manual substitution; update the DELETE request line and add/ensure the prior request has an `@name` and returns the id in its body for reference.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.vscode/extensions.json:
- Line 11: Revert the unrelated change that commented out the SonarLint
recommendation: restore the removed recommendation entry
"sonarsource.sonarlint-vscode" in the .vscode/extensions.json (undo the
commented line) so the PR only covers the Postman→REST Client change, or if
disabling SonarLint is intentional, move that edit into its own commit/PR with
an explanatory justification referencing the "sonarsource.sonarlint-vscode"
entry.
In `@rest/players.rest`:
- Around line 79-90: The PUT request JSON in the players REST test still sets
"middleName" to an empty string which will overwrite the corrected seed value;
update the request body so the middleName field is null (not ""), matching
seed_001_starting_eleven.py and the CHANGELOG fix; ensure any code constructing
this payload (the PUT request in this REST test) serializes middleName as JSON
null rather than an empty string.
---
Nitpick comments:
In `@rest/players.rest`:
- Around line 102-104: The DELETE request uses a single-brace placeholder
"{player_id}" which REST Client won't resolve; replace it with REST Client
variables and wiring (e.g., use the response naming directive from the earlier
POST/GET and reference the id via the response body) so the DELETE line
references the created player's id using REST Client syntax (double-brace or
response variable like the named-response body reference) rather than a manual
substitution; update the DELETE request line and add/ensure the prior request
has an `@name` and returns the id in its body for reference.
- Add rest/players.rest covering all CRUD operations for VS Code REST Client - Add humao.rest-client to .vscode/extensions.json recommendations - Add HTTP Requests section to README.md - Remove postman_collections/ directory Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4dd36eb to
75737b0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #494 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 110 110
=========================================
Hits 110 110
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Around line 47-48: The CHANGELOG.md entries for the new items
("rest/players.rest" and "humao.rest-client" recommendation and the entry on
line 74) are missing the issue reference; update those three lines to append the
bracketed issue reference " (`#493`)" so they match the established "[Unreleased]"
style (e.g., change "`rest/players.rest` file covering all CRUD operations,
compatible with the VS Code REST Client extension" to include " (`#493`)" and do
the same for "`humao.rest-client` added to `.vscode/extensions.json`
recommendations" and the entry at line 74).
.rest file
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…493) - Correct middleName from empty string to null in PUT request - Add issue reference to REST client CHANGELOG entries Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
f43fd1a to
38815cf
Compare
|
.rest file.rest file



Closes #493
This change is
Summary by CodeRabbit
New Features
Bug Fixes
Documentation