diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-11-05 14:35:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-05 06:35:54 +0000 |
commit | 61c35590c793449d3133b00f58302b5cce90d69c (patch) | |
tree | b546a0aa29f9d906ad7ab3e8b28e746d23016577 /routers/api/v1 | |
parent | 4a469c8e1b3c1d153316aec9fd8cbdd3e1dd54e8 (diff) | |
download | gitea-61c35590c793449d3133b00f58302b5cce90d69c.tar.gz gitea-61c35590c793449d3133b00f58302b5cce90d69c.zip |
Refactor RepoRefByType (#32413)
1. clarify the "filepath" could(should) contain "{ref}"
2. remove unclear RepoRefLegacy and RepoRefAny, use RepoRefUnknown to guess
3. by the way, avoid using AppURL
Diffstat (limited to 'routers/api/v1')
-rw-r--r-- | routers/api/v1/repo/file.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 97f7a49390..05650cc9be 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -56,12 +56,12 @@ func GetRawFile(ctx *context.APIContext) { // required: true // - name: filepath // in: path - // description: filepath of the file to get + // description: path of the file to get, it should be "{ref}/{filepath}". If there is no ref could be inferred, it will be treated as the default branch // type: string // required: true // - name: ref // in: query - // description: "The name of the commit/branch/tag. Default the repository’s default branch (usually master)" + // description: "The name of the commit/branch/tag. Default the repository’s default branch" // type: string // required: false // responses: @@ -109,12 +109,12 @@ func GetRawFileOrLFS(ctx *context.APIContext) { // required: true // - name: filepath // in: path - // description: filepath of the file to get + // description: path of the file to get, it should be "{ref}/{filepath}". If there is no ref could be inferred, it will be treated as the default branch // type: string // required: true // - name: ref // in: query - // description: "The name of the commit/branch/tag. Default the repository’s default branch (usually master)" + // description: "The name of the commit/branch/tag. Default the repository’s default branch" // type: string // required: false // responses: |