Skip to content

Commit

Permalink
Reuse the result definition in the common file
Browse files Browse the repository at this point in the history
(cherry picked from commit 51e4668)
  • Loading branch information
jruzzi committed Jul 15, 2022
1 parent b0982e6 commit 71468f2
Show file tree
Hide file tree
Showing 64 changed files with 3,104 additions and 3,196 deletions.
26 changes: 7 additions & 19 deletions AVInput/AVInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,11 @@
"class": "AVInput",
"description": "The `AVInput` API facilitates interactions with the Parker STB HDMI input. The HDMI input is presented by using a `VideoResource` whose url starts with `avin:`. For example: `avin://input1`."
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
"result": {
"type":"object",
"properties": {
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"success"
]
},
"success": {
"summary": "Whether the request succeeded",
"type": "boolean",
"example": "true"
}

},
"methods": {
"contentProtected": {
Expand All @@ -41,7 +29,7 @@
"example": true
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -71,7 +59,7 @@
"example": "Success"
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -102,7 +90,7 @@
"example": "Success"
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down
27 changes: 7 additions & 20 deletions ActivityMonitor/ActivityMonitor.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"class": "ActivityMonitor",
"description": "Monitor memory and CPU usage by application"
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
"pid": {
"summary": "The application process identifier",
Expand All @@ -18,22 +21,6 @@
"enum": ["exceeded", "receded"],
"example": "exceeded"
},
"result": {
"type":"object",
"properties": {
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"success"
]
},
"success": {
"summary": "Whether the request succeeded",
"type": "boolean",
"example": "true"
},
"appName": {
"summary": "The application name associated with `appPid`",
"type":"string",
Expand Down Expand Up @@ -106,7 +93,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"disableMonitoring":{
Expand All @@ -117,7 +104,7 @@
"properties": {}
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"getApplicationMemoryUsage": {
Expand Down Expand Up @@ -157,7 +144,7 @@
]
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -205,7 +192,7 @@
}
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down
66 changes: 27 additions & 39 deletions Bluetooth/Bluetooth.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"class": "Bluetooth",
"description": "First version of the Bluetooth Thunder API."
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
"deviceID":{
"summary":"ID that is derived from the Bluetooth MAC address. 6 byte MAC value is packed into 8 byte with leading zeros for first 2 bytes",
Expand Down Expand Up @@ -121,22 +124,7 @@
"type":"boolean",
"example":true
},
"result": {
"type":"object",
"properties": {
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"success"
]
},
"success": {
"summary": "Whether the request succeeded",
"type": "boolean",
"example": "true"
},

"paired": {
"summary":"Whether paired or not",
"type":"boolean",
Expand Down Expand Up @@ -264,13 +252,13 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"disable":{
"summary": "Disables the Bluetooth stack. \n \n### Events \n \n No Events",
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"disconnect":{
Expand All @@ -294,13 +282,13 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"enable":{
"summary": "Enables the Bluetooth stack. \n \n### Events \n\n No Events",
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"getAudioInfo":{
Expand Down Expand Up @@ -356,7 +344,7 @@
]
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -398,7 +386,7 @@
}
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -464,7 +452,7 @@
]
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -510,7 +498,7 @@
}
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand All @@ -530,7 +518,7 @@
"example":"RDK Bluetooth Device"
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -574,7 +562,7 @@
}
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand All @@ -592,7 +580,7 @@
"$ref": "#/definitions/discoverable"
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -622,7 +610,7 @@
"type":"object",
"properties": {
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -652,7 +640,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"sendAudioPlaybackCommand":{
Expand All @@ -673,7 +661,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"setAudioStream":{
Expand All @@ -694,7 +682,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"setDiscoverable":{
Expand All @@ -714,7 +702,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"setName":{
Expand All @@ -733,7 +721,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"startScan":{
Expand Down Expand Up @@ -763,7 +751,7 @@
"$ref": "#/definitions/status"
},
"success": {
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand All @@ -778,7 +766,7 @@
"onStatusChanged"
],
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"unpair":{
Expand All @@ -798,7 +786,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"getDeviceVolumeMuteInfo":{
Expand Down Expand Up @@ -841,7 +829,7 @@
}
},
"success":{
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required": [
Expand Down Expand Up @@ -876,7 +864,7 @@
]
},
"result": {
"$ref": "#/definitions/result"
"$ref": "#/common/result"
}
},
"getApiVersionNumber": {
Expand All @@ -888,7 +876,7 @@
"$ref": "#/definitions/version"
},
"success":{
"$ref": "#/definitions/success"
"$ref": "#/common/success"
}
},
"required":[
Expand Down
Loading

0 comments on commit 71468f2

Please sign in to comment.