Skip to content

Commit 291e0cc

Browse files
committed
Tag output data adjacently
1 parent 0996325 commit 291e0cc

File tree

3 files changed

+29
-25
lines changed

3 files changed

+29
-25
lines changed

tmc-langs-cli/api/output-data-download-or-update.json

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,26 @@
55
"result": "executed-command",
66
"data": {
77
"output-data-kind": "exercise-download",
8-
"downloaded": [
9-
{
10-
"course-slug": "some course",
11-
"exercise-slug": "some exercise",
12-
"path": "some path"
13-
},
14-
{
15-
"course-slug": "some course",
16-
"exercise-slug": "another exercise",
17-
"path": "another path"
18-
}
19-
],
20-
"skipped": [
21-
{
22-
"course-slug": "another course",
23-
"exercise-slug": "some skipped exercise",
24-
"path": "third path"
25-
}
26-
]
8+
"output-data": {
9+
"downloaded": [
10+
{
11+
"course-slug": "some course",
12+
"exercise-slug": "some exercise",
13+
"path": "some path"
14+
},
15+
{
16+
"course-slug": "some course",
17+
"exercise-slug": "another exercise",
18+
"path": "another path"
19+
}
20+
],
21+
"skipped": [
22+
{
23+
"course-slug": "another course",
24+
"exercise-slug": "some skipped exercise",
25+
"path": "third path"
26+
}
27+
]
28+
}
2729
}
2830
}

tmc-langs-cli/api/output-data-error.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
"result": "error",
66
"data": {
77
"output-data-kind": "error",
8-
"kind": "generic",
9-
"trace": [
10-
"trace 1",
11-
"trace 2"
12-
]
8+
"output-data": {
9+
"kind": "generic",
10+
"trace": [
11+
"trace 1",
12+
"trace 2"
13+
]
14+
}
1315
}
1416
}

tmc-langs-cli/src/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub struct OutputData {
5050

5151
#[derive(Debug, Serialize)]
5252
#[serde(rename_all = "kebab-case")]
53-
#[serde(tag = "output-data-kind")]
53+
#[serde(tag = "output-data-kind", content = "output-data")]
5454
pub enum Data {
5555
Error { kind: Kind, trace: Vec<String> },
5656
Validation(StyleValidationResult),

0 commit comments

Comments
 (0)