diff --git a/crates/api/src/v1/mod.rs b/crates/api/src/v1/mod.rs index 46697b35..878035f9 100644 --- a/crates/api/src/v1/mod.rs +++ b/crates/api/src/v1/mod.rs @@ -13,11 +13,18 @@ use serde::{Deserialize, Serialize}; #[serde(tag = "type", rename_all = "camelCase")] pub enum ContentSource { /// The content can be retrieved with an HTTP GET. + #[serde(rename_all = "camelCase")] HttpGet { /// The URL of the content. url: String, /// Optional, server accepts for HTTP Range header. - #[serde(default, skip_serializing_if = "is_false")] + /// TODO remove rename, see issue: https://github.com/bytecodealliance/registry/issues/221 + #[serde( + default, + skip_serializing_if = "is_false", + rename = "accept_ranges", + alias = "acceptRanges" + )] 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 2da327cf..cf209147 100644 --- a/crates/api/src/v1/package.rs +++ b/crates/api/src/v1/package.rs @@ -16,6 +16,7 @@ use warg_protocol::{ #[serde(tag = "type", rename_all = "camelCase")] pub enum UploadEndpoint { /// Content may be uploaded via HTTP request to the given URL. + #[serde(rename_all = "camelCase")] Http { /// The http method for the upload request. /// Only `POST` and `PUT` methods are supported.