Skip to content

Commit 453baf1

Browse files
Merge pull request #5 from devopsarr/feature/code-generation
fix(deps): update dependency radarr/radarr to v5.19.3.9730
2 parents 2841f6b + cc08cc9 commit 453baf1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1889
-299
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ serde_with = { version = "^3.8", default-features = false, features = ["base64",
1212
serde_json = "^1.0"
1313
serde_repr = "^0.1"
1414
url = "^2.5"
15-
uuid = { version = "^1.8", features = ["serde", "v4"] }
1615
reqwest = { version = "^0.12", features = ["json", "multipart"] }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
99

1010
- API version: v5.18.4.9674
1111
- Package version: 0.1.0 <!--- x-release-please-version -->
12-
- Generator version: 7.11.0
12+
- Generator version: 7.12.0
1313
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
1414

1515
## Installation

src/apis/alternative_title_api.rs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`get_alttitle_by_id`]
@@ -61,10 +61,20 @@ pub async fn get_alttitle_by_id(configuration: &configuration::Configuration, id
6161
let resp = configuration.client.execute(req).await?;
6262

6363
let status = resp.status();
64+
let content_type = resp
65+
.headers()
66+
.get("content-type")
67+
.and_then(|v| v.to_str().ok())
68+
.unwrap_or("application/octet-stream");
69+
let content_type = super::ContentType::from(content_type);
6470

6571
if !status.is_client_error() && !status.is_server_error() {
6672
let content = resp.text().await?;
67-
serde_json::from_str(&content).map_err(Error::from)
73+
match content_type {
74+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
75+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AlternativeTitleResource`"))),
76+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AlternativeTitleResource`")))),
77+
}
6878
} else {
6979
let content = resp.text().await?;
7080
let entity: Option<GetAlttitleByIdError> = serde_json::from_str(&content).ok();
@@ -110,10 +120,20 @@ pub async fn list_alttitle(configuration: &configuration::Configuration, movie_i
110120
let resp = configuration.client.execute(req).await?;
111121

112122
let status = resp.status();
123+
let content_type = resp
124+
.headers()
125+
.get("content-type")
126+
.and_then(|v| v.to_str().ok())
127+
.unwrap_or("application/octet-stream");
128+
let content_type = super::ContentType::from(content_type);
113129

114130
if !status.is_client_error() && !status.is_server_error() {
115131
let content = resp.text().await?;
116-
serde_json::from_str(&content).map_err(Error::from)
132+
match content_type {
133+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
134+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::AlternativeTitleResource&gt;`"))),
135+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::AlternativeTitleResource&gt;`")))),
136+
}
117137
} else {
118138
let content = resp.text().await?;
119139
let entity: Option<ListAlttitleError> = serde_json::from_str(&content).ok();

src/apis/api_info_api.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`get_api`]
@@ -52,10 +52,20 @@ pub async fn get_api(configuration: &configuration::Configuration, ) -> Result<m
5252
let resp = configuration.client.execute(req).await?;
5353

5454
let status = resp.status();
55+
let content_type = resp
56+
.headers()
57+
.get("content-type")
58+
.and_then(|v| v.to_str().ok())
59+
.unwrap_or("application/octet-stream");
60+
let content_type = super::ContentType::from(content_type);
5561

5662
if !status.is_client_error() && !status.is_server_error() {
5763
let content = resp.text().await?;
58-
serde_json::from_str(&content).map_err(Error::from)
64+
match content_type {
65+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
66+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiInfoResource`"))),
67+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiInfoResource`")))),
68+
}
5969
} else {
6070
let content = resp.text().await?;
6171
let entity: Option<GetApiError> = serde_json::from_str(&content).ok();

src/apis/authentication_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`create_login`]

src/apis/auto_tagging_api.rs

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`create_auto_tagging`]
@@ -90,10 +90,20 @@ pub async fn create_auto_tagging(configuration: &configuration::Configuration, a
9090
let resp = configuration.client.execute(req).await?;
9191

9292
let status = resp.status();
93+
let content_type = resp
94+
.headers()
95+
.get("content-type")
96+
.and_then(|v| v.to_str().ok())
97+
.unwrap_or("application/octet-stream");
98+
let content_type = super::ContentType::from(content_type);
9399

94100
if !status.is_client_error() && !status.is_server_error() {
95101
let content = resp.text().await?;
96-
serde_json::from_str(&content).map_err(Error::from)
102+
match content_type {
103+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
104+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AutoTaggingResource`"))),
105+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AutoTaggingResource`")))),
106+
}
97107
} else {
98108
let content = resp.text().await?;
99109
let entity: Option<CreateAutoTaggingError> = serde_json::from_str(&content).ok();
@@ -173,10 +183,20 @@ pub async fn get_auto_tagging_by_id(configuration: &configuration::Configuration
173183
let resp = configuration.client.execute(req).await?;
174184

175185
let status = resp.status();
186+
let content_type = resp
187+
.headers()
188+
.get("content-type")
189+
.and_then(|v| v.to_str().ok())
190+
.unwrap_or("application/octet-stream");
191+
let content_type = super::ContentType::from(content_type);
176192

177193
if !status.is_client_error() && !status.is_server_error() {
178194
let content = resp.text().await?;
179-
serde_json::from_str(&content).map_err(Error::from)
195+
match content_type {
196+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
197+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AutoTaggingResource`"))),
198+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AutoTaggingResource`")))),
199+
}
180200
} else {
181201
let content = resp.text().await?;
182202
let entity: Option<GetAutoTaggingByIdError> = serde_json::from_str(&content).ok();
@@ -213,10 +233,20 @@ pub async fn list_auto_tagging(configuration: &configuration::Configuration, ) -
213233
let resp = configuration.client.execute(req).await?;
214234

215235
let status = resp.status();
236+
let content_type = resp
237+
.headers()
238+
.get("content-type")
239+
.and_then(|v| v.to_str().ok())
240+
.unwrap_or("application/octet-stream");
241+
let content_type = super::ContentType::from(content_type);
216242

217243
if !status.is_client_error() && !status.is_server_error() {
218244
let content = resp.text().await?;
219-
serde_json::from_str(&content).map_err(Error::from)
245+
match content_type {
246+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
247+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::AutoTaggingResource&gt;`"))),
248+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::AutoTaggingResource&gt;`")))),
249+
}
220250
} else {
221251
let content = resp.text().await?;
222252
let entity: Option<ListAutoTaggingError> = serde_json::from_str(&content).ok();
@@ -253,10 +283,20 @@ pub async fn list_auto_tagging_schema(configuration: &configuration::Configurati
253283
let resp = configuration.client.execute(req).await?;
254284

255285
let status = resp.status();
286+
let content_type = resp
287+
.headers()
288+
.get("content-type")
289+
.and_then(|v| v.to_str().ok())
290+
.unwrap_or("application/octet-stream");
291+
let content_type = super::ContentType::from(content_type);
256292

257293
if !status.is_client_error() && !status.is_server_error() {
258294
let content = resp.text().await?;
259-
serde_json::from_str(&content).map_err(Error::from)
295+
match content_type {
296+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
297+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::AutoTaggingSpecificationSchema&gt;`"))),
298+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::AutoTaggingSpecificationSchema&gt;`")))),
299+
}
260300
} else {
261301
let content = resp.text().await?;
262302
let entity: Option<ListAutoTaggingSchemaError> = serde_json::from_str(&content).ok();
@@ -297,10 +337,20 @@ pub async fn update_auto_tagging(configuration: &configuration::Configuration, i
297337
let resp = configuration.client.execute(req).await?;
298338

299339
let status = resp.status();
340+
let content_type = resp
341+
.headers()
342+
.get("content-type")
343+
.and_then(|v| v.to_str().ok())
344+
.unwrap_or("application/octet-stream");
345+
let content_type = super::ContentType::from(content_type);
300346

301347
if !status.is_client_error() && !status.is_server_error() {
302348
let content = resp.text().await?;
303-
serde_json::from_str(&content).map_err(Error::from)
349+
match content_type {
350+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
351+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AutoTaggingResource`"))),
352+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AutoTaggingResource`")))),
353+
}
304354
} else {
305355
let content = resp.text().await?;
306356
let entity: Option<UpdateAutoTaggingError> = serde_json::from_str(&content).ok();

src/apis/backup_api.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`create_system_backup_restore_by_id`]
@@ -194,10 +194,20 @@ pub async fn list_system_backup(configuration: &configuration::Configuration, )
194194
let resp = configuration.client.execute(req).await?;
195195

196196
let status = resp.status();
197+
let content_type = resp
198+
.headers()
199+
.get("content-type")
200+
.and_then(|v| v.to_str().ok())
201+
.unwrap_or("application/octet-stream");
202+
let content_type = super::ContentType::from(content_type);
197203

198204
if !status.is_client_error() && !status.is_server_error() {
199205
let content = resp.text().await?;
200-
serde_json::from_str(&content).map_err(Error::from)
206+
match content_type {
207+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
208+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::BackupResource&gt;`"))),
209+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::BackupResource&gt;`")))),
210+
}
201211
} else {
202212
let content = resp.text().await?;
203213
let entity: Option<ListSystemBackupError> = serde_json::from_str(&content).ok();

src/apis/blocklist_api.rs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`delete_blocklist`]
@@ -187,10 +187,20 @@ pub async fn get_blocklist(configuration: &configuration::Configuration, page: O
187187
let resp = configuration.client.execute(req).await?;
188188

189189
let status = resp.status();
190+
let content_type = resp
191+
.headers()
192+
.get("content-type")
193+
.and_then(|v| v.to_str().ok())
194+
.unwrap_or("application/octet-stream");
195+
let content_type = super::ContentType::from(content_type);
190196

191197
if !status.is_client_error() && !status.is_server_error() {
192198
let content = resp.text().await?;
193-
serde_json::from_str(&content).map_err(Error::from)
199+
match content_type {
200+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
201+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BlocklistResourcePagingResource`"))),
202+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BlocklistResourcePagingResource`")))),
203+
}
194204
} else {
195205
let content = resp.text().await?;
196206
let entity: Option<GetBlocklistError> = serde_json::from_str(&content).ok();
@@ -232,10 +242,20 @@ pub async fn list_blocklist_movie(configuration: &configuration::Configuration,
232242
let resp = configuration.client.execute(req).await?;
233243

234244
let status = resp.status();
245+
let content_type = resp
246+
.headers()
247+
.get("content-type")
248+
.and_then(|v| v.to_str().ok())
249+
.unwrap_or("application/octet-stream");
250+
let content_type = super::ContentType::from(content_type);
235251

236252
if !status.is_client_error() && !status.is_server_error() {
237253
let content = resp.text().await?;
238-
serde_json::from_str(&content).map_err(Error::from)
254+
match content_type {
255+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
256+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::BlocklistResource&gt;`"))),
257+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::BlocklistResource&gt;`")))),
258+
}
239259
} else {
240260
let content = resp.text().await?;
241261
let entity: Option<ListBlocklistMovieError> = serde_json::from_str(&content).ok();

src/apis/calendar_api.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`list_calendar`]
@@ -69,10 +69,20 @@ pub async fn list_calendar(configuration: &configuration::Configuration, start:
6969
let resp = configuration.client.execute(req).await?;
7070

7171
let status = resp.status();
72+
let content_type = resp
73+
.headers()
74+
.get("content-type")
75+
.and_then(|v| v.to_str().ok())
76+
.unwrap_or("application/octet-stream");
77+
let content_type = super::ContentType::from(content_type);
7278

7379
if !status.is_client_error() && !status.is_server_error() {
7480
let content = resp.text().await?;
75-
serde_json::from_str(&content).map_err(Error::from)
81+
match content_type {
82+
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
83+
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::MovieResource&gt;`"))),
84+
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::MovieResource&gt;`")))),
85+
}
7686
} else {
7787
let content = resp.text().await?;
7888
let entity: Option<ListCalendarError> = serde_json::from_str(&content).ok();

src/apis/calendar_feed_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
use reqwest;
13-
use serde::{Deserialize, Serialize};
13+
use serde::{Deserialize, Serialize, de::Error as _};
1414
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration};
15+
use super::{Error, configuration, ContentType};
1616

1717

1818
/// struct for typed errors of method [`get_feed_v3_calendar_radarr_period_ics`]

0 commit comments

Comments
 (0)