diff options
author | 6543 <6543@obermui.de> | 2019-12-24 03:33:52 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-24 10:33:52 +0800 |
commit | 40e99ea010b3b0be241be0e1365a70d33777bcf2 (patch) | |
tree | cc7930e51a8ed41fcb183dae075d7ab211d06834 /templates | |
parent | 017f314b5a0f930b477efa1c2a5309f8cdd6d3c3 (diff) | |
download | gitea-40e99ea010b3b0be241be0e1365a70d33777bcf2.tar.gz gitea-40e99ea010b3b0be241be0e1365a70d33777bcf2.zip |
[API] Extend contents with dates (#9464)
* extend CommitTree func
* make sure Date NOT nil
* spell corection
Co-Authored-By: zeripath <art27@cantab.net>
* add TEST
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index dc9dd2395f..c4fa1f3112 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -8273,6 +8273,23 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "CommitDateOptions": { + "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE", + "type": "object", + "properties": { + "author": { + "type": "string", + "format": "date-time", + "x-go-name": "Author" + }, + "committer": { + "type": "string", + "format": "date-time", + "x-go-name": "Committer" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "CommitMeta": { "type": "object", "title": "CommitMeta contains meta information of a commit in terms of API.", @@ -8414,6 +8431,9 @@ "type": "string", "x-go-name": "Content" }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, "message": { "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", "type": "string", @@ -8972,6 +8992,9 @@ "committer": { "$ref": "#/definitions/Identity" }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, "message": { "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", "type": "string", @@ -11303,6 +11326,9 @@ "type": "string", "x-go-name": "Content" }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, "from_path": { "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL", "type": "string", |