Add GeoJSON and DateTime, unitCode and observedAt NGSI-LD support#843
Conversation
Prettify tests and update tests to use ES6 and update Copyrights
Tidy JSON response mocks
NGSI-LD Specification does not permit a String at the root level observedAt is only allowed within properties and relationships
- Update CNR - Add Docker ENV to docs - basic LD set-up documentation - amend copy-paste JavaDoc - add missing JavaDoc - remove blank lines.
Merge branch 'feature/ngsi-ld-measure' into feature/time-and-geo
| @@ -176,5 +176,10 @@ module.exports = { | |||
| this.name = 'BAD_TIMESTAMP'; | |||
| this.message = 'Invalid ISO8601 timestamp [' + payload + ']'; | |||
There was a problem hiding this comment.
CHANGES_NEXT_RELEASE entry should be added
(Maybe at the end we will group all the NGSI-LD ones together in a single entry, but by the moment let's add the one corresponding to each PR)
There was a problem hiding this comment.
On the other hand, I understand this PR doesn't need any addition/modification to the documentation, does it?
There was a problem hiding this comment.
Maybe the following behaviour should be documented (not fully sure)?
The NGSI v2
TimeInstantelement has been mapped onto the NGSI-LDobservedAtpropertyThe NGSI v2
metadata.unitCodeattribute has been mapped onto the NGSI-LDunitCodeproperty
There was a problem hiding this comment.
What about documentation modifications?
There was a problem hiding this comment.
Minimal documentation has been added: fa90072
| obj[key] = json[key]; | ||
| break; | ||
| case constants.TIMESTAMP_ATTRIBUTE: | ||
| /* |
There was a problem hiding this comment.
Leftover? Code to ve activated in a next PR?
Co-Authored-By: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-Authored-By: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-Authored-By: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-Authored-By: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-Authored-By: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-Authored-By: Fermín Galán Márquez <fgalan@users.noreply.github.com>
This PR adds GeoJSON and DateTime,
unitCodeandobservedAtNGSI-LD supportParsing now supports native parsing of JSON primitives plus the following:
Temporal Properties
DateTime- always expressed in UTC, using ISO 8601Date- always expressed in UTC, using ISO 8601Time- always expressed in UTC, using ISO 8601Geospatial Properties
Point- represent ascoordinatesas mandated by IETF RFC 7946LineString- represent ascoordinatesas mandated by IETF RFC 7946Polygon- represent ascoordinatesas mandated by IETF RFC 7946MultiPoint- represent ascoordinatesas mandated by IETF RFC 7946MultiLineString- represent ascoordinatesas mandated by IETF RFC 7946MultiPolygon- represent ascoordinatesas mandated by IETF RFC 7946The NGSI v2
TimeInstantelement has been mapped onto the NGSI-LDobservedAtpropertyThe NGSI v2
metadata.unitCodeattribute has been mapped onto the NGSI-LDunitCodepropertyThe set of tests expectation have been amended where necessary. Additional tests added.