summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/generated/methods.rs8
-rw-r--r--swagger.v1.json3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/generated/methods.rs b/src/generated/methods.rs
index 9cc914f..c2404c9 100644
--- a/src/generated/methods.rs
+++ b/src/generated/methods.rs
@@ -4309,13 +4309,13 @@ impl crate::Forgejo {
repo: &str,
filepath: &str,
query: RepoGetRawFileOrLfsQuery,
- ) -> Result<(), ForgejoError> {
+ ) -> Result<Vec<u8>, ForgejoError> {
let request = self
.get(&format!("repos/{owner}/{repo}/media/{filepath}?{query}"))
.build()?;
let response = self.execute(request).await?;
match response.status().as_u16() {
- 200 => Ok(()),
+ 200 => Ok(response.bytes().await?[..].to_vec()),
_ => Err(ForgejoError::UnexpectedStatusCode(response.status())),
}
}
@@ -5235,13 +5235,13 @@ impl crate::Forgejo {
repo: &str,
filepath: &str,
query: RepoGetRawFileQuery,
- ) -> Result<(), ForgejoError> {
+ ) -> Result<Vec<u8>, ForgejoError> {
let request = self
.get(&format!("repos/{owner}/{repo}/raw/{filepath}?{query}"))
.build()?;
let response = self.execute(request).await?;
match response.status().as_u16() {
- 200 => Ok(()),
+ 200 => Ok(response.bytes().await?[..].to_vec()),
_ => Err(ForgejoError::UnexpectedStatusCode(response.status())),
}
}
diff --git a/swagger.v1.json b/swagger.v1.json
index 36592ad..274063a 100644
--- a/swagger.v1.json
+++ b/swagger.v1.json
@@ -9112,6 +9112,7 @@
},
"/repos/{owner}/{repo}/media/{filepath}": {
"get": {
+ "produces": ["*/*"],
"tags": ["repository"],
"summary": "Get a file or it's LFS object from a repository",
"operationId": "repoGetRawFileOrLFS",
@@ -11172,7 +11173,7 @@
},
"/repos/{owner}/{repo}/raw/{filepath}": {
"get": {
- "produces": ["application/json"],
+ "produces": ["*/*"],
"tags": ["repository"],
"summary": "Get a file from a repository",
"operationId": "repoGetRawFile",