Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: Use `defaultBranch` for payload key
Alexis Sellier committed 3 years ago
commit 66d76d7ab26a69b176f7c8ce5788a53c106e0491
parent 5f80ee96711ac922cc108a3e851d0fb6712d4d22
2 files changed +8 -7
modified radicle-cli/examples/rad-init.md
@@ -11,11 +11,11 @@ ok Project heartwood created
{
  "name": "heartwood",
  "description": "Radicle Heartwood Protocol & Stack",
-
  "default-branch": "master"
+
  "defaultBranch": "master"
}


-
Your project id is rad:zb2rNRYmmz7SLZ7xMjM7dddswC3K. You can show it any time by running:
+
Your project id is rad:z2TBtGrJKGsremYAPec6vN4n77Ba7. You can show it any time by running:
   rad .

To publish your project to the network, run:
@@ -27,5 +27,5 @@ Projects can be listed with the `ls` command:

```
$ rad ls
-
heartwood rad:zb2rNRYmmz7SLZ7xMjM7dddswC3K cdf76ce Radicle Heartwood Protocol & Stack
+
heartwood rad:z2TBtGrJKGsremYAPec6vN4n77Ba7 cdf76ce Radicle Heartwood Protocol & Stack
```
modified radicle/src/identity/project.rs
@@ -69,11 +69,11 @@ impl DocError {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
-
#[serde(rename_all = "kebab-case")]
+
#[serde(rename_all = "camelCase")]
pub struct Payload {
    pub name: String,
-
    pub description: String,            // TODO: Make optional.
-
    pub default_branch: git::RefString, // TODO: Make optional.
+
    pub description: String,
+
    pub default_branch: git::RefString,
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
@@ -82,6 +82,7 @@ pub struct Payload {
pub struct Namespace(String);

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+
#[serde(rename_all = "camelCase")]
pub struct Doc<V> {
    #[serde(rename = "xyz.radicle.project")]
    pub payload: Payload,
@@ -501,7 +502,7 @@ mod test {
        );
        assert_eq!(
            id.to_human(),
-
            String::from("rad:zb2rNRYmmz7SLZ7xMjM7dddswC3K")
+
            String::from("rad:z2TBtGrJKGsremYAPec6vN4n77Ba7")
        );
    }