diff options
author | Adam Majer <amajer@suse.com> | 2024-07-25 14:06:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 14:06:19 +0200 |
commit | bae87dfb0958e6a2920c905e51c2a026b7b71ca6 (patch) | |
tree | 645828989df238706c0c7af87ae53552ea40023d /templates | |
parent | cc044818c33ff066c4e5869c9e75de9707def6ed (diff) | |
download | gitea-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.tmpl | 15 |
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" |