Align skills REST API contract with RESTful conventions#3818
Merged
Conversation
Change skill routes to use standard HTTP verbs on resources:
- POST /install -> POST / (resource creation)
- POST /uninstall -> DELETE /{name} (resource deletion with path param)
Add scope enum constraints to swagger query params, document
Location header on install, and add 400/404/409 failure codes.
Add ValidateScope() and Scope field to InfoOptions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3818 +/- ##
==========================================
- Coverage 66.88% 66.87% -0.01%
==========================================
Files 439 439
Lines 43437 43443 +6
==========================================
+ Hits 29051 29053 +2
- Misses 12134 12138 +4
Partials 2252 2252 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aponcedeleonch
approved these changes
Feb 13, 2026
JAORMX
added a commit
that referenced
this pull request
Feb 13, 2026
Update skill handlers and tests to align with the RESTful routes merged in #3818: - Install: POST /skills with Location header - Uninstall: DELETE /skills/{name}?scope= (path param + query param) - Add ValidateScope calls to list, info, and uninstall handlers - Update tests for new routes and validation - Regenerate swagger docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The skills endpoints (merged as 501 stubs in #3801) used verb-based routes
(
POST /install,POST /uninstall) that don't follow REST conventions. ThisPR fixes the API contract before the service implementation lands, so #3804
can rebase onto clean routes.
POST /skills/install→POST /skills/— standard resource creationPOST /skills/uninstall→DELETE /skills/{name}— idiomatic resource deletion via path param +?scope=query paramuninstallSkillRequestbody type (no longer needed)Enums(user, project)constraint to all threescopequery params (list, info, uninstall) for machine-readable OpenAPI validationLocationheader on 201 install responseValidateScope()function for scope validation at API boundariesScopefield toInfoOptionsso the info endpoint can accept scope filteringRoute comparison
POST /api/v1beta/skills/installPOST /api/v1beta/skillsPOST /api/v1beta/skills/uninstall(JSON body)DELETE /api/v1beta/skills/{name}?scope=GET /api/v1beta/skills?scope=enum)GET /api/v1beta/skills/{name}?scope=enum + 404)All handlers remain 501 stubs — zero service code is touched. #3804 will
rebase onto this and adapt its handlers to the new routes.
Why now?
Changing routes after the service implementation lands means rewriting handler
code, tests, and client assumptions simultaneously. Doing it while everything
is still a stub makes the change trivial and reviewable.
Refs: #3648, #3741
Test plan
task lint— 0 issuestask test— all passingtask docs— swagger regenerated with enum constraintsTestValidateScope— 8 cases: valid scopes, unknown values, case sensitivity, whitespace, trailing spaces, and error message content assertions🤖 Generated with Claude Code