summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-10-23 20:12:32 +0200
committerCyborus <cyborus@cyborus.xyz>2024-10-23 20:12:32 +0200
commite1b7c588c06fe086e160a6eb72982541469fe154 (patch)
tree76c04c228858630daaa2ec3fbf4f450c41ca82bb /src
parentfeat: support optional formData parameters (diff)
downloadforgejo-api-e1b7c588c06fe086e160a6eb72982541469fe154.tar.xz
forgejo-api-e1b7c588c06fe086e160a6eb72982541469fe154.zip
fix: add missing `"format": "url"` fields
Diffstat (limited to 'src')
-rw-r--r--src/generated/structs.rs24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/generated/structs.rs b/src/generated/structs.rs
index fc4cef6..1687c0c 100644
--- a/src/generated/structs.rs
+++ b/src/generated/structs.rs
@@ -1045,8 +1045,9 @@ pub struct DispatchWorkflowOption {
/// EditAttachmentOptions options for editing attachments
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct EditAttachmentOptions {
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
/// (Can only be set if existing attachment is of external type)
- pub browser_download_url: Option<String>,
+ pub browser_download_url: Option<url::Url>,
pub name: Option<String>,
}
@@ -2298,14 +2299,16 @@ pub struct PullReviewComment {
#[serde(with = "time::serde::rfc3339::option")]
pub created_at: Option<time::OffsetDateTime>,
pub diff_hunk: Option<String>,
- pub html_url: Option<String>,
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
+ pub html_url: Option<url::Url>,
pub id: Option<i64>,
pub original_commit_id: Option<String>,
pub original_position: Option<u64>,
pub path: Option<String>,
pub position: Option<u64>,
pub pull_request_review_id: Option<i64>,
- pub pull_request_url: Option<String>,
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
+ pub pull_request_url: Option<url::Url>,
pub resolver: Option<User>,
#[serde(with = "time::serde::rfc3339::option")]
pub updated_at: Option<time::OffsetDateTime>,
@@ -2371,8 +2374,9 @@ pub struct QuotaUsed {
/// QuotaUsedArtifact represents an artifact counting towards a user's quota
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct QuotaUsedArtifact {
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
/// HTML URL to the action run containing the artifact
- pub html_url: Option<String>,
+ pub html_url: Option<url::Url>,
/// Name of the artifact
pub name: Option<String>,
/// Size of the artifact (compressed)
@@ -2382,8 +2386,9 @@ pub struct QuotaUsedArtifact {
/// QuotaUsedAttachment represents an attachment counting towards a user's quota
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct QuotaUsedAttachment {
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
/// API URL for the attachment
- pub api_url: Option<String>,
+ pub api_url: Option<url::Url>,
/// Context for the attachment: URLs to the containing object
pub contained_in: Option<QuotaUsedAttachmentContainedIn>,
/// Filename of the attachment
@@ -2395,17 +2400,20 @@ pub struct QuotaUsedAttachment {
/// Context for the attachment: URLs to the containing object
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct QuotaUsedAttachmentContainedIn {
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
/// API URL for the object that contains this attachment
- pub api_url: Option<String>,
+ pub api_url: Option<url::Url>,
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
/// HTML URL for the object that contains this attachment
- pub html_url: Option<String>,
+ pub html_url: Option<url::Url>,
}
/// QuotaUsedPackage represents a package counting towards a user's quota
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct QuotaUsedPackage {
+ #[serde(deserialize_with = "crate::none_if_blank_url")]
/// HTML URL to the package version
- pub html_url: Option<String>,
+ pub html_url: Option<url::Url>,
/// Name of the package
pub name: Option<String>,
/// Size of the package version