Document 502 Bad Gateway failure for installSkill in OpenAPI spec#4960
Merged
Document 502 Bad Gateway failure for installSkill in OpenAPI spec#4960
Conversation
Follow-up to #4956: installFromOCI now returns 502 on upstream pull failures (matching installFromGit), but the @failure list on the installSkill swagger annotation still only advertised 400/409/500. Add @failure 502 {string} string "Bad Gateway" and regenerate the spec so clients see the real contract for POST /api/v1beta/skills.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4960 +/- ##
==========================================
- Coverage 69.49% 69.46% -0.03%
==========================================
Files 551 551
Lines 55817 55817
==========================================
- Hits 38790 38775 -15
- Misses 14037 14053 +16
+ Partials 2990 2989 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jhrozek
approved these changes
Apr 21, 2026
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
Follow-up on review feedback from #4956 (comment):
installFromGitalready returned502 Bad Gatewayon upstream pull failures, and #4956 alignedinstallFromOCIwith the same behaviour — but the@Failurelist oninstallSkillinpkg/api/v1/skills.gostill only advertised400 / 409 / 500.Add
@Failure 502 {string} string "Bad Gateway"to the annotation and regenerate the OpenAPI spec so clients see the real contract forPOST /api/v1beta/skills.Pre-existing documentation gap, not introduced by #4956.
Type of change
Test plan
task docsswagger.yamlnow lists502 Bad Gatewayalongside400 / 409 / 500onPOST /api/v1beta/skillsChanges
pkg/api/v1/skills.go@Failure 502 {string} string "Bad Gateway"to theinstallSkillannotationdocs/server/docs.go,docs/server/swagger.json,docs/server/swagger.yamlDoes this introduce a user-facing change?
No runtime behaviour change — only the generated OpenAPI spec is updated. API clients consuming the spec will now see
502 Bad Gatewayas a documented response forPOST /api/v1beta/skills, which already matched the runtime behaviour as of #4956.