From e1b7c588c06fe086e160a6eb72982541469fe154 Mon Sep 17 00:00:00 2001 From: Cyborus Date: Wed, 23 Oct 2024 14:12:32 -0400 Subject: fix: add missing `"format": "url"` fields --- src/generated/structs.rs | 24 ++++++++++++++++-------- swagger.v1.json | 8 ++++++++ 2 files changed, 24 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, + pub browser_download_url: Option, pub name: Option, } @@ -2298,14 +2299,16 @@ pub struct PullReviewComment { #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, pub diff_hunk: Option, - pub html_url: Option, + #[serde(deserialize_with = "crate::none_if_blank_url")] + pub html_url: Option, pub id: Option, pub original_commit_id: Option, pub original_position: Option, pub path: Option, pub position: Option, pub pull_request_review_id: Option, - pub pull_request_url: Option, + #[serde(deserialize_with = "crate::none_if_blank_url")] + pub pull_request_url: Option, pub resolver: Option, #[serde(with = "time::serde::rfc3339::option")] pub updated_at: Option, @@ -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, + pub html_url: Option, /// Name of the artifact pub name: Option, /// 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, + pub api_url: Option, /// Context for the attachment: URLs to the containing object pub contained_in: Option, /// 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, + pub api_url: Option, + #[serde(deserialize_with = "crate::none_if_blank_url")] /// HTML URL for the object that contains this attachment - pub html_url: Option, + pub html_url: Option, } /// 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, + pub html_url: Option, /// Name of the package pub name: Option, /// Size of the package version diff --git a/swagger.v1.json b/swagger.v1.json index ccb25be..810ab11 100644 --- a/swagger.v1.json +++ b/swagger.v1.json @@ -20285,6 +20285,7 @@ "browser_download_url": { "description": "(Can only be set if existing attachment is of external type)", "type": "string", + "format": "url", "x-go-name": "DownloadURL" }, "name": { @@ -23418,6 +23419,7 @@ }, "html_url": { "type": "string", + "format": "url", "x-go-name": "HTMLURL" }, "id": { @@ -23450,6 +23452,7 @@ }, "pull_request_url": { "type": "string", + "format": "url", "x-go-name": "HTMLPullURL" }, "resolver": { @@ -23616,6 +23619,7 @@ "html_url": { "description": "HTML URL to the action run containing the artifact", "type": "string", + "format": "url", "x-go-name": "HTMLURL" }, "name": { @@ -23647,6 +23651,7 @@ "api_url": { "description": "API URL for the attachment", "type": "string", + "format": "url", "x-go-name": "APIURL" }, "contained_in": { @@ -23656,11 +23661,13 @@ "api_url": { "description": "API URL for the object that contains this attachment", "type": "string", + "format": "url", "x-go-name": "APIURL" }, "html_url": { "description": "HTML URL for the object that contains this attachment", "type": "string", + "format": "url", "x-go-name": "HTMLURL" } }, @@ -23695,6 +23702,7 @@ "html_url": { "description": "HTML URL to the package version", "type": "string", + "format": "url", "x-go-name": "HTMLURL" }, "name": { -- cgit v1.2.3