Skip to content

Commit ece32ca

Browse files
authored
feat: added docs for 'cont' flag for Contributions API (#66)
1 parent 259087e commit ece32ca

File tree

7 files changed

+40
-13
lines changed

7 files changed

+40
-13
lines changed

Diff for: __tests__/schemas.spec.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,17 @@ describe(header('device shadow'), () => {
5353

5454
describe('Validate example for dependencies', () => {
5555
it('can correctly load device shadow', () => {
56-
const exampleData = JSON.parse(readFileSync('./schemas/deviceShadow/ipShadow/ipShadow-example.json', 'utf-8'));
57-
const valid = getValidationWithDependencies(DeviceShadow.IP, [DeviceShadow.Config], exampleData);
56+
const exampleData = JSON.parse(
57+
readFileSync(
58+
'./schemas/deviceShadow/ipShadow/ipShadow-example.json',
59+
'utf-8',
60+
),
61+
);
62+
const valid = getValidationWithDependencies(
63+
DeviceShadow.IP,
64+
[DeviceShadow.Config],
65+
exampleData,
66+
);
5867
expect(valid).toBeTruthy();
59-
});
68+
});
6069
});

Diff for: schemas/deviceToCloud/cell_position/cell-position-example.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"config": {
55
"doReply": true,
66
"hiConf": false,
7-
"fallback": true
7+
"fallback": true,
8+
"cont": false
89
},
910
"data": {
1011
"lte": [
@@ -19,4 +20,4 @@
1920
}
2021
]
2122
}
22-
}
23+
}

Diff for: schemas/deviceToCloud/cell_position/cell-position.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
"type": "boolean",
2929
"description": "nRF Cloud will always return the most accurate response based on cell tower location or AP location for wifi, if available. When not available, nRF Cloud falls back to area-level location estimate based on cell tower tracking area code. To disable this behavior, set fallback=false. This will ignore cell tracking area and return a 404 in event a higher accuracy response cannot be provided.",
3030
"default": true
31+
},
32+
"cont": {
33+
"type": "boolean",
34+
"description": "nRF Cloud automatically uses your contributions to override our usual location response. To disable this behavior, set cont=false. This will ignore the contributions and proceed with the usual process for resolving your location.",
35+
"default": true
3136
}
3237
},
3338
"additionalProperties": false
@@ -63,7 +68,7 @@
6368
},
6469
"rsrq": {
6570
"$ref": "#/definitions/Rsrq"
66-
},
71+
},
6772
"earfcn": {
6873
"$ref": "#/definitions/Earfcn"
6974
},
@@ -157,4 +162,4 @@
157162
"data"
158163
],
159164
"additionalProperties": false
160-
}
165+
}

Diff for: schemas/deviceToCloud/ground_fix/ground-fix-example.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"config": {
55
"doReply": true,
66
"hiConf": false,
7-
"fallback": true
7+
"fallback": true,
8+
"cont": false
89
},
910
"data": {
1011
"wifi": {
@@ -37,4 +38,4 @@
3738
}
3839
]
3940
}
40-
}
41+
}

Diff for: schemas/deviceToCloud/ground_fix/ground-fix.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
"type": "boolean",
2929
"description": "nRF Cloud will always return the most accurate response based on cell tower location or AP location for wifi, if available. When not available, nRF Cloud falls back to area-level location estimate based on cell tower tracking area code. To disable this behavior, set fallback=false. This will ignore cell tracking area and return a 404 in event a higher accuracy response cannot be provided.",
3030
"default": true
31+
},
32+
"cont": {
33+
"type": "boolean",
34+
"description": "nRF Cloud automatically uses your contributions to override our usual location response. To disable this behavior, set cont=false. This will ignore the contributions and proceed with the usual process for resolving your location.",
35+
"default": true
3136
}
3237
},
3338
"additionalProperties": false
@@ -214,4 +219,4 @@
214219
"data"
215220
],
216221
"additionalProperties": false
217-
}
222+
}

Diff for: schemas/deviceToCloud/wifi/wifi-position-example.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"messageType": "DATA",
44
"config": {
55
"doReply": true,
6-
"hiConf": true
6+
"hiConf": true,
7+
"cont": false
78
},
89
"data": {
910
"accessPoints": [
@@ -15,4 +16,4 @@
1516
}
1617
]
1718
}
18-
}
19+
}

Diff for: schemas/deviceToCloud/wifi/wifi-position.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
"type": "boolean",
2424
"description": "nRF Cloud automatically uses a 68% confidence interval when estimating the Horizontal Positioning Error (HPE) for a location. This means that there is a 68% probability that the device's actual location is within the HPE radius of the returned coordinates. Enabling this flag will use a 95% confidence interval instead, resulting in a larger HPE radius, and a higher probability that the device's actual location is within the circle.",
2525
"default": false
26+
},
27+
"cont": {
28+
"type": "boolean",
29+
"description": "nRF Cloud automatically uses your contributions to override our usual location response. To disable this behavior, set cont=false. This will ignore the contributions and proceed with the usual process for resolving your location.",
30+
"default": true
2631
}
2732
},
2833
"additionalProperties": false
@@ -101,4 +106,4 @@
101106
"description": "Channel number (only one of Channel or Frequency should be used)"
102107
}
103108
}
104-
}
109+
}

0 commit comments

Comments
 (0)