Skip to content

Conversation

@coltea
Copy link
Collaborator

@coltea coltea commented Dec 22, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 22, 2025 07:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes incorrect Swagger documentation for the share file upload endpoint by replacing the wrong response type (v1.ShareFileUploadReq) with the correct one (v1.FileUploadResp). The issue was that the Swagger annotation was referencing a request type instead of the response type that the handler actually returns.

Key changes:

  • Updated Swagger annotation in handler to use v1.FileUploadResp instead of v1.ShareFileUploadReq
  • Regenerated Swagger documentation files (swagger.yaml, swagger.json, docs.go) to reflect the correct response schema

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
backend/handler/share/common.go Fixed Swagger annotation comment to reference correct response type (v1.FileUploadResp)
backend/docs/swagger.yaml Updated generated Swagger YAML to replace ShareFileUploadReq definition with FileUploadResp and use it in the response schema
backend/docs/swagger.json Updated generated Swagger JSON to replace ShareFileUploadReq definition with FileUploadResp and use it in the response schema
backend/docs/docs.go Updated generated Go documentation to match the corrected Swagger definitions

The changes look correct and consistent. The PR properly fixes a documentation bug where:

  1. The response type was incorrectly documented as v1.ShareFileUploadReq (a request type with fields captcha_token and file)
  2. The actual code returns v1.FileUploadResp (a response type with field key)
  3. All generated Swagger files have been properly regenerated to reflect this correction

No issues found - the changes are accurate and complete.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coltea coltea merged commit 07051e8 into chaitin:main Dec 22, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant