aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAdam Majer <amajer@suse.com>2024-07-25 14:06:19 +0200
committerGitHub <noreply@github.com>2024-07-25 14:06:19 +0200
commitbae87dfb0958e6a2920c905e51c2a026b7b71ca6 (patch)
tree645828989df238706c0c7af87ae53552ea40023d /templates
parentcc044818c33ff066c4e5869c9e75de9707def6ed (diff)
downloadgitea-bae87dfb0958e6a2920c905e51c2a026b7b71ca6.tar.gz
gitea-bae87dfb0958e6a2920c905e51c2a026b7b71ca6.zip
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>
Diffstat (limited to 'templates')
-rw-r--r--templates/swagger/v1_json.tmpl15
1 files changed, 12 insertions, 3 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 3fc2698ff2..e7c6761606 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -10609,6 +10609,9 @@
},
"/repos/{owner}/{repo}/media/{filepath}": {
"get": {
+ "produces": [
+ "application/octet-stream"
+ ],
"tags": [
"repository"
],
@@ -10645,7 +10648,10 @@
],
"responses": {
"200": {
- "description": "Returns raw file content."
+ "description": "Returns raw file content.",
+ "schema": {
+ "type": "file"
+ }
},
"404": {
"$ref": "#/responses/notFound"
@@ -12682,7 +12688,7 @@
"/repos/{owner}/{repo}/raw/{filepath}": {
"get": {
"produces": [
- "application/json"
+ "application/octet-stream"
],
"tags": [
"repository"
@@ -12720,7 +12726,10 @@
],
"responses": {
"200": {
- "description": "Returns raw file content."
+ "description": "Returns raw file content.",
+ "schema": {
+ "type": "file"
+ }
},
"404": {
"$ref": "#/responses/notFound"