From 9633992493bffe90c1b2fd00be602f707beafca9 Mon Sep 17 00:00:00 2001 From: Cyborus Date: Tue, 9 Jul 2024 14:54:01 -0400 Subject: fix!: integers are signed by default --- generator/src/main.rs | 6 +- generator/src/methods.rs | 6 +- generator/src/structs.rs | 16 +- src/generated/methods.rs | 2 +- src/generated/structs.rs | 276 +++++++++++++-------------- swagger.v1.json | 471 ++++++++++++++++++++++++++++++++--------------- tests/admin.rs | 6 +- tests/repo.rs | 31 ++-- 8 files changed, 501 insertions(+), 313 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index 5d9d2c7..f69df2d 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -94,8 +94,10 @@ fn schema_type_name( } .to_string(), Primitive::Integer => match schema.format.as_deref() { - Some("int32") => "u32", - Some("int64") => "u64", + Some("uint32") => "u32", + Some("uint64") => "u64", + Some("int32") => "i32", + Some("int64") => "i64", _ => "u32", } .to_string(), diff --git a/generator/src/methods.rs b/generator/src/methods.rs index 6877437..75bb7db 100644 --- a/generator/src/methods.rs +++ b/generator/src/methods.rs @@ -222,8 +222,10 @@ pub fn param_type_inner( } .into(), ParameterType::Integer => match format.as_deref() { - Some("int32") => "u32", - Some("int64") => "u64", + Some("uint32") => "u32", + Some("uint64") => "u64", + Some("int32") => "i32", + Some("int64") => "i64", _ => "u32", } .into(), diff --git a/generator/src/structs.rs b/generator/src/structs.rs index 6a74dc1..4bd4418 100644 --- a/generator/src/structs.rs +++ b/generator/src/structs.rs @@ -547,12 +547,18 @@ fn create_header_struct( } }, ParameterType::Integer => match header.format.as_deref() { - Some("int64") => { + Some("uint64") => { imp.push_str("s.parse::().map_err(|_| StructureError::HeaderParseFailed)") } - Some("int32") | _ => { + Some("uint32") => { imp.push_str("s.parse::().map_err(|_| StructureError::HeaderParseFailed)") } + Some("int64") => { + imp.push_str("s.parse::().map_err(|_| StructureError::HeaderParseFailed)") + } + Some("int32") | _ => { + imp.push_str("s.parse::().map_err(|_| StructureError::HeaderParseFailed)") + } }, ParameterType::Boolean => { imp.push_str("s.parse::().map_err(|_| StructureError::HeaderParseFailed)") @@ -584,8 +590,10 @@ fn create_header_struct( Some("double") | _ => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", }, ParameterType::Integer => match items.format.as_deref() { - Some("int64") => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", - Some("int32") | _ => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", + Some("uint64") => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", + Some("uint32") => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", + Some("int64") => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", + Some("int32") | _ => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", }, ParameterType::Boolean => "s.parse::()).collect::, _>>().map_err(|_| StructureError::HeaderParseFailed)", ParameterType::Array => eyre::bail!("nested arrays not supported in headers"), diff --git a/src/generated/methods.rs b/src/generated/methods.rs index 96a3e18..621b3c9 100644 --- a/src/generated/methods.rs +++ b/src/generated/methods.rs @@ -4287,7 +4287,7 @@ impl crate::Forgejo { &self, owner: &str, repo: &str, - ) -> Result, ForgejoError> { + ) -> Result, ForgejoError> { let request = self .get(&format!("repos/{owner}/{repo}/languages")) .build()?; diff --git a/src/generated/structs.rs b/src/generated/structs.rs index 5b97ac9..b08b0ee 100644 --- a/src/generated/structs.rs +++ b/src/generated/structs.rs @@ -10,7 +10,7 @@ pub struct APIError { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct AccessToken { - pub id: Option, + pub id: Option, pub name: Option, pub scopes: Option>, pub sha1: Option, @@ -20,19 +20,19 @@ pub struct AccessToken { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct Activity { pub act_user: Option, - pub act_user_id: Option, + pub act_user_id: Option, pub comment: Option, - pub comment_id: Option, + pub comment_id: Option, pub content: Option, #[serde(with = "time::serde::rfc3339::option")] pub created: Option, - pub id: Option, + pub id: Option, pub is_private: Option, pub op_type: Option, pub ref_name: Option, pub repo: Option, - pub repo_id: Option, - pub user_id: Option, + pub repo_id: Option, + pub user_id: Option, } /// ActivityPub type @@ -54,7 +54,7 @@ pub struct AddTimeOption { #[serde(with = "time::serde::rfc3339::option")] pub created: Option, /// time in seconds - pub time: u64, + pub time: i64, /// User who spent the time (optional) pub user_name: Option, } @@ -89,16 +89,16 @@ pub struct Attachment { pub browser_download_url: Option, #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, - pub download_count: Option, - pub id: Option, + pub download_count: Option, + pub id: Option, pub name: Option, - pub size: Option, + pub size: Option, pub uuid: Option, } #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct BlockedUser { - pub block_id: Option, + pub block_id: Option, #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, } @@ -111,7 +111,7 @@ pub struct Branch { pub enable_status_check: Option, pub name: Option, pub protected: Option, - pub required_approvals: Option, + pub required_approvals: Option, pub status_check_contexts: Option>, pub user_can_merge: Option, pub user_can_push: Option, @@ -144,7 +144,7 @@ pub struct BranchProtection { pub push_whitelist_teams: Option>, pub push_whitelist_usernames: Option>, pub require_signed_commits: Option, - pub required_approvals: Option, + pub required_approvals: Option, pub rule_name: Option, pub status_check_contexts: Option>, pub unprotected_file_patterns: Option, @@ -201,11 +201,11 @@ pub struct ChangeFilesOptions { /// ChangedFile store information about files affected by the pull request #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct ChangedFile { - pub additions: Option, - pub changes: Option, + pub additions: Option, + pub changes: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub contents_url: Option, - pub deletions: Option, + pub deletions: Option, pub filename: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, @@ -224,7 +224,7 @@ pub struct CombinedStatus { pub sha: Option, pub state: Option, pub statuses: Option>, - pub total_count: Option, + pub total_count: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub url: Option, } @@ -238,11 +238,11 @@ pub struct Comment { pub created_at: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub issue_url: Option, pub original_author: Option, - pub original_author_id: Option, + pub original_author_id: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub pull_request_url: Option, #[serde(with = "time::serde::rfc3339::option")] @@ -295,9 +295,9 @@ pub struct CommitMeta { /// CommitStats is statistics for a RepoCommit #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct CommitStats { - pub additions: Option, - pub deletions: Option, - pub total: Option, + pub additions: Option, + pub deletions: Option, + pub total: Option, } /// CommitStatus holds a single status of a single Commit @@ -308,7 +308,7 @@ pub struct CommitStatus { pub created_at: Option, pub creator: Option, pub description: Option, - pub id: Option, + pub id: Option, pub status: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub target_url: Option, @@ -350,7 +350,7 @@ pub struct ContentsResponse { pub name: Option, pub path: Option, pub sha: Option, - pub size: Option, + pub size: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] /// `submodule_git_url` is populated when `type` is `submodule`, otherwise null pub submodule_git_url: Option, @@ -395,7 +395,7 @@ pub struct CreateBranchProtectionOption { pub push_whitelist_teams: Option>, pub push_whitelist_usernames: Option>, pub require_signed_commits: Option, - pub required_approvals: Option, + pub required_approvals: Option, pub rule_name: Option, pub status_check_contexts: Option>, pub unprotected_file_patterns: Option, @@ -525,9 +525,9 @@ pub struct CreateIssueOption { #[serde(with = "time::serde::rfc3339::option")] pub due_date: Option, /// list of label ids - pub labels: Option>, + pub labels: Option>, /// milestone id - pub milestone: Option, + pub milestone: Option, #[serde(rename = "ref")] pub r#ref: Option, pub title: String, @@ -621,8 +621,8 @@ pub struct CreatePullRequestOption { #[serde(with = "time::serde::rfc3339::option")] pub due_date: Option, pub head: Option, - pub labels: Option>, - pub milestone: Option, + pub labels: Option>, + pub milestone: Option, pub title: Option, } @@ -631,9 +631,9 @@ pub struct CreatePullRequestOption { pub struct CreatePullReviewComment { pub body: Option, /// if comment to new file line or 0 - pub new_position: Option, + pub new_position: Option, /// if comment to old file line or 0 - pub old_position: Option, + pub old_position: Option, /// the tree path pub path: Option, } @@ -768,7 +768,7 @@ pub struct CreateUserOption { pub password: Option, pub restricted: Option, pub send_notify: Option, - pub source_id: Option, + pub source_id: Option, pub username: String, pub visibility: Option, } @@ -787,7 +787,7 @@ pub struct CreateWikiPageOptions { /// Cron represents a Cron task #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct Cron { - pub exec_times: Option, + pub exec_times: Option, pub name: Option, #[serde(with = "time::serde::rfc3339::option")] pub next: Option, @@ -849,9 +849,9 @@ pub struct DeployKey { #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, pub fingerprint: Option, - pub id: Option, + pub id: Option, pub key: Option, - pub key_id: Option, + pub key_id: Option, pub read_only: Option, pub repository: Option, pub title: Option, @@ -895,7 +895,7 @@ pub struct EditBranchProtectionOption { pub push_whitelist_teams: Option>, pub push_whitelist_usernames: Option>, pub require_signed_commits: Option, - pub required_approvals: Option, + pub required_approvals: Option, pub status_check_contexts: Option>, pub unprotected_file_patterns: Option, } @@ -940,7 +940,7 @@ pub struct EditIssueOption { pub body: Option, #[serde(with = "time::serde::rfc3339::option")] pub due_date: Option, - pub milestone: Option, + pub milestone: Option, #[serde(rename = "ref")] pub r#ref: Option, pub state: Option, @@ -1004,8 +1004,8 @@ pub struct EditPullRequestOption { pub body: Option, #[serde(with = "time::serde::rfc3339::option")] pub due_date: Option, - pub labels: Option>, - pub milestone: Option, + pub labels: Option>, + pub milestone: Option, pub state: Option, pub title: Option, pub unset_due_date: Option, @@ -1131,13 +1131,13 @@ pub struct EditUserOption { pub full_name: Option, pub location: Option, pub login_name: String, - pub max_repo_creation: Option, + pub max_repo_creation: Option, pub must_change_password: Option, pub password: Option, pub prohibit_login: Option, pub pronouns: Option, pub restricted: Option, - pub source_id: u64, + pub source_id: i64, pub visibility: Option, pub website: Option, } @@ -1147,7 +1147,7 @@ pub struct EditUserOption { pub struct Email { pub email: Option, pub primary: Option, - pub user_id: Option, + pub user_id: Option, pub username: Option, pub verified: Option, } @@ -1235,7 +1235,7 @@ pub struct GPGKey { pub emails: Option>, #[serde(with = "time::serde::rfc3339::option")] pub expires_at: Option, - pub id: Option, + pub id: Option, pub key_id: Option, pub primary_key_id: Option, pub public_key: Option, @@ -1253,10 +1253,10 @@ pub struct GPGKeyEmail { /// GeneralAPISettings contains global api settings exposed by it #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct GeneralAPISettings { - pub default_git_trees_per_page: Option, - pub default_max_blob_size: Option, - pub default_paging_num: Option, - pub max_response_items: Option, + pub default_git_trees_per_page: Option, + pub default_max_blob_size: Option, + pub default_paging_num: Option, + pub max_response_items: Option, } /// GeneralAttachmentSettings contains global Attachment settings exposed by API @@ -1264,8 +1264,8 @@ pub struct GeneralAPISettings { pub struct GeneralAttachmentSettings { pub allowed_types: Option, pub enabled: Option, - pub max_files: Option, - pub max_size: Option, + pub max_files: Option, + pub max_size: Option, } /// GeneralRepoSettings contains global repository settings exposed by API @@ -1323,7 +1323,7 @@ pub struct GitBlobResponse { pub content: Option, pub encoding: Option, pub sha: Option, - pub size: Option, + pub size: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub url: Option, } @@ -1334,7 +1334,7 @@ pub struct GitEntry { pub mode: Option, pub path: Option, pub sha: Option, - pub size: Option, + pub size: Option, #[serde(rename = "type")] pub r#type: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] @@ -1361,9 +1361,9 @@ pub struct GitObject { /// GitTreeResponse returns a git tree #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct GitTreeResponse { - pub page: Option, + pub page: Option, pub sha: Option, - pub total_count: Option, + pub total_count: Option, pub tree: Option>, pub truncated: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] @@ -1389,7 +1389,7 @@ pub struct Hook { #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, pub events: Option>, - pub id: Option, + pub id: Option, pub metadata: Option, #[serde(rename = "type")] pub r#type: Option, @@ -1426,21 +1426,21 @@ pub struct Issue { pub body: Option, #[serde(with = "time::serde::rfc3339::option")] pub closed_at: Option, - pub comments: Option, + pub comments: Option, #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, #[serde(with = "time::serde::rfc3339::option")] pub due_date: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub is_locked: Option, pub labels: Option>, pub milestone: Option, - pub number: Option, + pub number: Option, pub original_author: Option, - pub original_author_id: Option, - pub pin_order: Option, + pub original_author_id: Option, + pub pin_order: Option, pub pull_request: Option, #[serde(rename = "ref")] pub r#ref: Option, @@ -1503,7 +1503,7 @@ pub struct IssueFormFieldVisible {} #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct IssueLabelsOption { /// list of label IDs - pub labels: Option>, + pub labels: Option>, #[serde(with = "time::serde::rfc3339::option")] pub updated_at: Option, } @@ -1511,7 +1511,7 @@ pub struct IssueLabelsOption { /// IssueMeta basic issue information #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct IssueMeta { - pub index: Option, + pub index: Option, pub owner: Option, pub repo: Option, } @@ -1536,7 +1536,7 @@ pub struct Label { pub color: Option, pub description: Option, pub exclusive: Option, - pub id: Option, + pub id: Option, pub is_archived: Option, pub name: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] @@ -1702,7 +1702,7 @@ pub struct MigrateRepoOptions { pub repo_owner: Option, pub service: Option, /// deprecated (only for backwards compatibility) - pub uid: Option, + pub uid: Option, pub wiki: Option, } @@ -1730,14 +1730,14 @@ pub enum MigrateRepoOptionsService { pub struct Milestone { #[serde(with = "time::serde::rfc3339::option")] pub closed_at: Option, - pub closed_issues: Option, + pub closed_issues: Option, #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, pub description: Option, #[serde(with = "time::serde::rfc3339::option")] pub due_on: Option, - pub id: Option, - pub open_issues: Option, + pub id: Option, + pub open_issues: Option, pub state: Option, pub title: Option, #[serde(with = "time::serde::rfc3339::option")] @@ -1784,9 +1784,9 @@ pub struct NodeInfoSoftware { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct NodeInfoUsage { #[serde(rename = "localComments")] - pub local_comments: Option, + pub local_comments: Option, #[serde(rename = "localPosts")] - pub local_posts: Option, + pub local_posts: Option, pub users: Option, } @@ -1794,10 +1794,10 @@ pub struct NodeInfoUsage { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct NodeInfoUsageUsers { #[serde(rename = "activeHalfyear")] - pub active_halfyear: Option, + pub active_halfyear: Option, #[serde(rename = "activeMonth")] - pub active_month: Option, - pub total: Option, + pub active_month: Option, + pub total: Option, } /// Note contains information related to a git note @@ -1810,7 +1810,7 @@ pub struct Note { /// NotificationCount number of unread notifications #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct NotificationCount { - pub new: Option, + pub new: Option, } /// NotificationSubject contains the notification subject (Issue/Pull/Commit) @@ -1833,7 +1833,7 @@ pub struct NotificationSubject { /// NotificationThread expose Notification on API #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct NotificationThread { - pub id: Option, + pub id: Option, pub pinned: Option, pub repository: Option, pub subject: Option, @@ -1855,7 +1855,7 @@ pub struct OAuth2Application { pub confidential_client: Option, #[serde(with = "time::serde::rfc3339::option")] pub created: Option, - pub id: Option, + pub id: Option, pub name: Option, pub redirect_uris: Option>, } @@ -1877,7 +1877,7 @@ pub struct Organization { pub description: Option, pub email: Option, pub full_name: Option, - pub id: Option, + pub id: Option, pub location: Option, pub name: Option, pub repo_admin_change_team_access: Option, @@ -1904,7 +1904,7 @@ pub struct PRBranchInfo { #[serde(rename = "ref")] pub r#ref: Option, pub repo: Option, - pub repo_id: Option, + pub repo_id: Option, pub sha: Option, } @@ -1916,7 +1916,7 @@ pub struct Package { pub creator: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub name: Option, pub owner: Option, pub repository: Option, @@ -1929,8 +1929,8 @@ pub struct Package { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct PackageFile { #[serde(rename = "Size")] - pub size: Option, - pub id: Option, + pub size: Option, + pub id: Option, pub md5: Option, pub name: Option, pub sha1: Option, @@ -1989,7 +1989,7 @@ pub struct PublicKey { #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, pub fingerprint: Option, - pub id: Option, + pub id: Option, pub key: Option, pub key_type: Option, pub read_only: Option, @@ -2009,7 +2009,7 @@ pub struct PullRequest { pub body: Option, #[serde(with = "time::serde::rfc3339::option")] pub closed_at: Option, - pub comments: Option, + pub comments: Option, #[serde(with = "time::serde::rfc3339::option")] pub created_at: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] @@ -2019,7 +2019,7 @@ pub struct PullRequest { pub head: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub is_locked: Option, pub labels: Option>, pub merge_base: Option, @@ -2030,10 +2030,10 @@ pub struct PullRequest { pub merged_at: Option, pub merged_by: Option, pub milestone: Option, - pub number: Option, + pub number: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub patch_url: Option, - pub pin_order: Option, + pub pin_order: Option, #[serde(deserialize_with = "crate::requested_reviewers_ignore_null")] pub requested_reviewers: Option>, pub state: Option, @@ -2058,12 +2058,12 @@ pub struct PullRequestMeta { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct PullReview { pub body: Option, - pub comments_count: Option, + pub comments_count: Option, pub commit_id: Option, pub dismissed: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub official: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub pull_request_url: Option, @@ -2087,12 +2087,12 @@ pub struct PullReviewComment { pub diff_hunk: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub original_commit_id: Option, - pub original_position: Option, + pub original_position: Option, pub path: Option, - pub position: Option, - pub pull_request_review_id: Option, + pub position: Option, + pub pull_request_review_id: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub pull_request_url: Option, pub resolver: Option, @@ -2152,7 +2152,7 @@ pub struct Release { pub draft: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub name: Option, pub prerelease: Option, #[serde(with = "time::serde::rfc3339::option")] @@ -2243,7 +2243,7 @@ pub struct Repository { pub external_tracker: Option, pub external_wiki: Option, pub fork: Option, - pub forks_count: Option, + pub forks_count: Option, pub full_name: Option, pub has_actions: Option, pub has_issues: Option, @@ -2254,7 +2254,7 @@ pub struct Repository { pub has_wiki: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, pub ignore_whitespace_conflicts: Option, pub internal: Option, pub internal_tracker: Option, @@ -2268,26 +2268,26 @@ pub struct Repository { pub mirror_updated: Option, pub name: Option, pub object_format_name: Option, - pub open_issues_count: Option, - pub open_pr_counter: Option, + pub open_issues_count: Option, + pub open_pr_counter: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub original_url: Option, pub owner: Option, pub parent: Option>, pub permissions: Option, pub private: Option, - pub release_counter: Option, + pub release_counter: Option, pub repo_transfer: Option, - pub size: Option, + pub size: Option, #[serde(deserialize_with = "crate::deserialize_optional_ssh_url")] pub ssh_url: Option, - pub stars_count: Option, + pub stars_count: Option, pub template: Option, #[serde(with = "time::serde::rfc3339::option")] pub updated_at: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub url: Option, - pub watchers_count: Option, + pub watchers_count: Option, pub website: Option, pub wiki_branch: Option, } @@ -2296,7 +2296,7 @@ pub struct Repository { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct RepositoryMeta { pub full_name: Option, - pub id: Option, + pub id: Option, pub name: Option, pub owner: Option, } @@ -2342,11 +2342,11 @@ pub struct StopWatch { #[serde(with = "time::serde::rfc3339::option")] pub created: Option, pub duration: Option, - pub issue_index: Option, + pub issue_index: Option, pub issue_title: Option, pub repo_name: Option, pub repo_owner_name: Option, - pub seconds: Option, + pub seconds: Option, } /// SubmitPullReviewOptions are options to submit a pending pull review @@ -2374,7 +2374,7 @@ pub struct Tag { pub struct Team { pub can_create_org_repo: Option, pub description: Option, - pub id: Option, + pub id: Option, pub includes_all_repositories: Option, pub name: Option, pub organization: Option, @@ -2411,7 +2411,7 @@ pub struct TimelineComment { pub dependent_issue: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub html_url: Option, - pub id: Option, + pub id: Option, #[serde(deserialize_with = "crate::none_if_blank_url")] pub issue_url: Option, pub label: Option