Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added docs for 'cont' flag for Contributions API #66

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions __tests__/schemas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ describe(header('device shadow'), () => {

describe('Validate example for dependencies', () => {
it('can correctly load device shadow', () => {
const exampleData = JSON.parse(readFileSync('./schemas/deviceShadow/ipShadow/ipShadow-example.json', 'utf-8'));
const valid = getValidationWithDependencies(DeviceShadow.IP, [DeviceShadow.Config], exampleData);
const exampleData = JSON.parse(
readFileSync(
'./schemas/deviceShadow/ipShadow/ipShadow-example.json',
'utf-8',
),
);
const valid = getValidationWithDependencies(
DeviceShadow.IP,
[DeviceShadow.Config],
exampleData,
);
expect(valid).toBeTruthy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"config": {
"doReply": true,
"hiConf": false,
"fallback": true
"fallback": true,
"cont": false
},
"data": {
"lte": [
Expand All @@ -19,4 +20,4 @@
}
]
}
}
}
9 changes: 7 additions & 2 deletions schemas/deviceToCloud/cell_position/cell-position.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"type": "boolean",
"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.",
"default": true
},
"cont": {
"type": "boolean",
"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.",
"default": true
}
},
"additionalProperties": false
Expand Down Expand Up @@ -63,7 +68,7 @@
},
"rsrq": {
"$ref": "#/definitions/Rsrq"
},
},
"earfcn": {
"$ref": "#/definitions/Earfcn"
},
Expand Down Expand Up @@ -157,4 +162,4 @@
"data"
],
"additionalProperties": false
}
}
5 changes: 3 additions & 2 deletions schemas/deviceToCloud/ground_fix/ground-fix-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"config": {
"doReply": true,
"hiConf": false,
"fallback": true
"fallback": true,
"cont": false
},
"data": {
"wifi": {
Expand Down Expand Up @@ -37,4 +38,4 @@
}
]
}
}
}
7 changes: 6 additions & 1 deletion schemas/deviceToCloud/ground_fix/ground-fix.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"type": "boolean",
"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.",
"default": true
},
"cont": {
"type": "boolean",
"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.",
"default": true
}
},
"additionalProperties": false
Expand Down Expand Up @@ -214,4 +219,4 @@
"data"
],
"additionalProperties": false
}
}
5 changes: 3 additions & 2 deletions schemas/deviceToCloud/wifi/wifi-position-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"messageType": "DATA",
"config": {
"doReply": true,
"hiConf": true
"hiConf": true,
"cont": false
},
"data": {
"accessPoints": [
Expand All @@ -15,4 +16,4 @@
}
]
}
}
}
7 changes: 6 additions & 1 deletion schemas/deviceToCloud/wifi/wifi-position.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"type": "boolean",
"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.",
"default": false
},
"cont": {
"type": "boolean",
"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.",
"default": true
}
},
"additionalProperties": false
Expand Down Expand Up @@ -101,4 +106,4 @@
"description": "Channel number (only one of Channel or Frequency should be used)"
}
}
}
}
Loading