From 6709761305f68cc9b08de596c63823430c183e60 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Thu, 29 Feb 2024 11:49:46 -0600 Subject: [PATCH 1/2] removed temporary alias fields --- crates/api/src/v1/mod.rs | 8 +------- crates/api/src/v1/package.rs | 2 -- crates/client/src/storage.rs | 4 ---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/crates/api/src/v1/mod.rs b/crates/api/src/v1/mod.rs index 9288b10d..f875d1fa 100644 --- a/crates/api/src/v1/mod.rs +++ b/crates/api/src/v1/mod.rs @@ -28,13 +28,7 @@ pub enum ContentSource { /// The URL of the content. url: String, /// Optional, server accepts for HTTP Range header. - /// TODO remove rename, see issue: https://github.com/bytecodealliance/registry/issues/221 - #[serde( - default, - skip_serializing_if = "is_false", - rename = "accept_ranges", - alias = "acceptRanges" - )] + #[serde(default, skip_serializing_if = "is_false")] accept_ranges: bool, /// Optional, provides content size in bytes. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/crates/api/src/v1/package.rs b/crates/api/src/v1/package.rs index ae8d7bf7..15097a7d 100644 --- a/crates/api/src/v1/package.rs +++ b/crates/api/src/v1/package.rs @@ -43,8 +43,6 @@ pub struct MissingContent { #[serde(rename_all = "camelCase")] pub struct PublishRecordRequest<'a> { /// The package name being published. - /// TODO: Remove the alias for `packageId` according to compatibility release schedule. - #[serde(alias = "packageId")] pub package_name: Cow<'a, PackageName>, /// The publish record to add to the package log. pub record: Cow<'a, ProtoEnvelopeBody>, diff --git a/crates/client/src/storage.rs b/crates/client/src/storage.rs index 8482a975..0dc09f51 100644 --- a/crates/client/src/storage.rs +++ b/crates/client/src/storage.rs @@ -219,8 +219,6 @@ pub struct OperatorInfo { #[serde(rename_all = "camelCase")] pub struct PackageInfo { /// The package name to publish. - /// TODO: drop alias after sufficient time according to release policy. - #[serde(alias = "id")] pub name: PackageName, /// The last known checkpoint of the package. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -288,8 +286,6 @@ pub enum PublishEntry { #[serde(rename_all = "camelCase")] pub struct PublishInfo { /// The package name being published. - /// TODO: drop alias after sufficient time according to release policy. - #[serde(alias = "id")] pub name: PackageName, /// The last known head of the package log to use. /// From d3ef701b62dd49d96e8e9bb76d3b44e572e53423 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Tue, 5 Mar 2024 09:58:33 -0600 Subject: [PATCH 2/2] alias `accept_ranges` --- crates/api/src/v1/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/api/src/v1/mod.rs b/crates/api/src/v1/mod.rs index f875d1fa..3d2692a9 100644 --- a/crates/api/src/v1/mod.rs +++ b/crates/api/src/v1/mod.rs @@ -28,7 +28,7 @@ pub enum ContentSource { /// The URL of the content. url: String, /// Optional, server accepts for HTTP Range header. - #[serde(default, skip_serializing_if = "is_false")] + #[serde(default, skip_serializing_if = "is_false", alias = "accept_ranges")] accept_ranges: bool, /// Optional, provides content size in bytes. #[serde(skip_serializing_if = "Option::is_none")]