Date related issues
dpatil-fw opened this issue · 1 comments
The guidelines here https://github.com/smart-data-models/data-models/blob/master/guidelines.md
state that:
- Attribute names should be in camelCase
"DateYearLess": {
"type": "string",
"pattern": "^--((0[13578]|1[02])-31|(0[1,3-9]|1[0-2])-30|(0\\d|1[0-2])-([0-2]\\d))$"
},
Should 'DateYearLess' be defined as 'dateYearLess'?
- dateCreated and dateModified
At the same guidelines link, https://github.com/smart-data-models/data-models/blob/master/guidelines.md it is stated that:
dateCreated in NGSIv2 (createdAt in NGSI-LD) must not be used as long as they are internal attributes of the NGSI specification.
dateModified in NGSIv2 (modifiedAt in NGSI-LD) must not be used as long as they are internal attributes of the NGSI specification.
"dateCreated": {
"type": "string",
"format": "date-time",
"description": "Property. Entity creation timestamp. This will usually be allocated by the storage platform."
},
"dateModified": {
"type": "string",
"format": "date-time",
"description": "Property. Timestamp of the last modification of the entity. This will usually be allocated by the storage platform."
},
Should dateCreated and dateModified be in common-schema.json? If so, how will the name difference(createdAt and modifiedAt) with NGSI-LD be handled?
There is a relevant difference between dateCreated and dateModified compared with createdAt and modifiedAt. The first two can, unfortunately, be modified. From our point of view, this is a flaw of this version but it is also true that if you know what you are doing it could some cases be useful.
This is not the case for createdAt and modifiedAt which are real internal parameters and cannot be modified by the user.
So NGSI-LD is more 'consistent' than NGSI-v2 but the users who are the ones to find it useful or not.
Having said that, dateCreated and dateModified are also there because of compatibility with the GSMA approach in the very first days of the initiative.