mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor repo contents API and add "contents-ext" API (#34822)
See the updated swagger document for details.
This commit is contained in:
@@ -119,6 +119,11 @@ type FileLinksResponse struct {
|
||||
HTMLURL *string `json:"html"`
|
||||
}
|
||||
|
||||
type ContentsExtResponse struct {
|
||||
FileContents *ContentsResponse `json:"file_contents,omitempty"`
|
||||
DirContents []*ContentsResponse `json:"dir_contents,omitempty"`
|
||||
}
|
||||
|
||||
// ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
|
||||
type ContentsResponse struct {
|
||||
Name string `json:"name"`
|
||||
@@ -145,6 +150,9 @@ type ContentsResponse struct {
|
||||
// `submodule_git_url` is populated when `type` is `submodule`, otherwise null
|
||||
SubmoduleGitURL *string `json:"submodule_git_url"`
|
||||
Links *FileLinksResponse `json:"_links"`
|
||||
|
||||
LfsOid *string `json:"lfs_oid"`
|
||||
LfsSize *int64 `json:"lfs_size"`
|
||||
}
|
||||
|
||||
// FileCommitResponse contains information generated from a Git commit for a repo's file.
|
||||
|
Reference in New Issue
Block a user