Skip to content

Document 502 Bad Gateway failure for installSkill in OpenAPI spec#4960

Merged
samuv merged 1 commit intomainfrom
skill-swagger
Apr 21, 2026
Merged

Document 502 Bad Gateway failure for installSkill in OpenAPI spec#4960
samuv merged 1 commit intomainfrom
skill-swagger

Conversation

@samuv
Copy link
Copy Markdown
Contributor

@samuv samuv commented Apr 21, 2026

Summary

Follow-up on review feedback from #4956 (comment): installFromGit already returned 502 Bad Gateway on upstream pull failures, and #4956 aligned installFromOCI with the same behaviour — but the @Failure list on installSkill in pkg/api/v1/skills.go still only advertised 400 / 409 / 500.

Add @Failure 502 {string} string "Bad Gateway" to the annotation and regenerate the OpenAPI spec so clients see the real contract for POST /api/v1beta/skills.

Pre-existing documentation gap, not introduced by #4956.

Type of change

  • Documentation update (OpenAPI spec only, no runtime behaviour change)

Test plan

  • Spec regenerated with task docs
  • Verified swagger.yaml now lists 502 Bad Gateway alongside 400 / 409 / 500 on POST /api/v1beta/skills

Changes

File Change
pkg/api/v1/skills.go Add @Failure 502 {string} string "Bad Gateway" to the installSkill annotation
docs/server/docs.go, docs/server/swagger.json, docs/server/swagger.yaml Regenerated spec

Does 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 Gateway as a documented response for POST /api/v1beta/skills, which already matched the runtime behaviour as of #4956.

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.
@samuv samuv requested review from JAORMX and amirejaz as code owners April 21, 2026 10:16
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Apr 21, 2026
@samuv samuv self-assigned this Apr 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.46%. Comparing base (ccf439d) to head (3f23336).
⚠️ Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samuv samuv merged commit 14fe9b6 into main Apr 21, 2026
68 of 69 checks passed
@samuv samuv deleted the skill-swagger branch April 21, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants