mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add return type to GetRawFileOrLFS and GetRawFile (#31680)
Document return type for the endpoints that fetch specific files from a repository. This allows the swagger generated code to read the returned data. Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -42,7 +42,7 @@ func GetRawFile(ctx *context.APIContext) {
|
||||
// ---
|
||||
// summary: Get a file from a repository
|
||||
// produces:
|
||||
// - application/json
|
||||
// - application/octet-stream
|
||||
// parameters:
|
||||
// - name: owner
|
||||
// in: path
|
||||
@@ -67,6 +67,8 @@ func GetRawFile(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// 200:
|
||||
// description: Returns raw file content.
|
||||
// schema:
|
||||
// type: file
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
@@ -92,6 +94,8 @@ func GetRawFileOrLFS(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/media/{filepath} repository repoGetRawFileOrLFS
|
||||
// ---
|
||||
// summary: Get a file or it's LFS object from a repository
|
||||
// produces:
|
||||
// - application/octet-stream
|
||||
// parameters:
|
||||
// - name: owner
|
||||
// in: path
|
||||
@@ -116,6 +120,8 @@ func GetRawFileOrLFS(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// 200:
|
||||
// description: Returns raw file content.
|
||||
// schema:
|
||||
// type: file
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
|
Reference in New Issue
Block a user