Skip to content

Commit 085f036

Browse files
RDKEMW-4279 Update the DeviceDiagnostics plugin entservice-apis doc (#197)
* RDKEMW-4279 Update the DeviceDiagnostics plugin entservice-apis doc * Update DeviceDiagnostics.json * Update DeviceDiagnosticsPlugin.md * RDKEMW-4279: Update DeviceDiagnosticsPlugin.md * RDKEMW-4279 Update the DeviceDiagnostics plugin entservice-apis doc * RDKEMW-4279 Update the DeviceDiagnostics plugin entservice-apis doc --------- Co-authored-by: Srikanth <[email protected]>
1 parent a6b3787 commit 085f036

File tree

2 files changed

+76
-43
lines changed

2 files changed

+76
-43
lines changed

docs/apis/DeviceDiagnosticsPlugin.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ No Events
7474

7575
| Name | Type | Description |
7676
| :-------- | :-------- | :-------- |
77-
| result | array | An array of JSON objects with the specified properties and their values |
78-
| result[#] | object | |
79-
| result[#].name | string | The property name; Empty, if the property name is not supported |
80-
| result[#].value | string | The property value; Empty, if the property name is not supported |
77+
| result | object | |
78+
| result.paramList | array | An array of JSON objects with the specified properties and their values |
79+
| result.paramList[#] | object | |
80+
| result.paramList[#].name | string | The property name; Empty, if the property name is not supported |
81+
| result.paramList[#].value | string | The property value; Empty, if the property name is not supported |
82+
| result.success | boolean | Whether the request succeeded |
8183

8284
### Example
8385

@@ -102,12 +104,15 @@ No Events
102104
{
103105
"jsonrpc": "2.0",
104106
"id": 42,
105-
"result": [
106-
{
107-
"name": "Device.X_CISCO_COM_LED.RedPwm",
108-
"value": "123"
109-
}
110-
]
107+
"result": {
108+
"paramList": [
109+
{
110+
"name": "Device.X_CISCO_COM_LED.RedPwm",
111+
"value": "123"
112+
}
113+
],
114+
"success": true
115+
}
111116
}
112117
```
113118

@@ -128,8 +133,10 @@ This method takes no parameters.
128133

129134
| Name | Type | Description |
130135
| :-------- | :-------- | :-------- |
131-
| result | array | A string [] of milestones |
132-
| result[#] | string | |
136+
| result | object | |
137+
| result.milestones | array | A string [] of milestones |
138+
| result.milestones[#] | string | |
139+
| result.success | boolean | Whether the request succeeded |
133140

134141
### Example
135142

@@ -149,9 +156,12 @@ This method takes no parameters.
149156
{
150157
"jsonrpc": "2.0",
151158
"id": 42,
152-
"result": [
153-
"RDK_STARTED:7097 ..."
154-
]
159+
"result": {
160+
"milestones": [
161+
"2020 Jan 28 08:24:06.762355 abcdpq1 systemd[1]: Starting Log RDK Started Service..."
162+
],
163+
"success": true
164+
}
155165
}
156166
```
157167

@@ -175,7 +185,7 @@ No Events
175185

176186
| Name | Type | Description |
177187
| :-------- | :-------- | :-------- |
178-
| result | null | Always null |
188+
| result | boolean | Whether the request succeeded |
179189

180190
### Errors
181191

@@ -204,7 +214,7 @@ No Events
204214
{
205215
"jsonrpc": "2.0",
206216
"id": 42,
207-
"result": null
217+
"result": true
208218
}
209219
```
210220

tools/json_generator/output/DeviceDiagnostics/DeviceDiagnostics.json

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,61 @@
5353
},
5454
"result": {
5555
"type": "object",
56-
"summary": "An array of JSON objects with the specified properties and their values",
57-
"type":"array",
58-
"items": {
59-
"type": "object",
60-
"properties": {
61-
"name": {
62-
"summary": "The property name; Empty, if the property name is not supported",
63-
"type":"string",
64-
"example": "Device.X_CISCO_COM_LED.RedPwm"
65-
},
66-
"value": {
67-
"summary": "The property value; Empty, if the property name is not supported",
68-
"type":"string",
69-
"example": "123"
56+
"properties": {
57+
"paramList": {
58+
"summary": "An array of JSON objects with the specified properties and their values",
59+
"type":"array",
60+
"items": {
61+
"type": "object",
62+
"properties": {
63+
"name": {
64+
"summary": "The property name; Empty, if the property name is not supported",
65+
"type":"string",
66+
"example": "Device.X_CISCO_COM_LED.RedPwm"
67+
},
68+
"value": {
69+
"summary": "The property value; Empty, if the property name is not supported",
70+
"type":"string",
71+
"example": "123"
72+
}
73+
},
74+
"required": [
75+
"name",
76+
"value"
77+
]
7078
}
7179
},
72-
"required": [
73-
"name",
74-
"value"
75-
]
76-
}
80+
"success": {
81+
"$ref": "#/common/success"
82+
}
83+
},
84+
"required": [
85+
"paramList",
86+
"success"
87+
]
7788
}
7889
},
7990
"getMilestones": {
8091
"summary": "Returns the list of milestones.",
8192
"result": {
82-
"summary": "A string [] of milestones",
83-
"type": "array",
84-
"items": {
85-
"type": "string",
86-
"example": "RDK_STARTED:7097 ..."
87-
}
93+
"type": "object",
94+
"properties": {
95+
"milestones": {
96+
"summary": "A string [] of milestones",
97+
"type": "array",
98+
"items": {
99+
"type":"string",
100+
"example": "2020 Jan 28 08:24:06.762355 abcdpq1 systemd[1]: Starting Log RDK Started Service..."
101+
}
102+
},
103+
"success":{
104+
"$ref": "#/common/success"
105+
}
106+
},
107+
"required": [
108+
"milestones",
109+
"success"
110+
]
88111
}
89112
},
90113
"logMilestone": {
@@ -102,7 +125,7 @@
102125
]
103126
},
104127
"result": {
105-
"$ref": "#/common/results/void"
128+
"$ref": "#/common/success"
106129
},
107130
"errors": [
108131
{

0 commit comments

Comments
 (0)