-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
regarding to issue FIWARE#76
thanks for sending this contribution, in order not to raise a maintenance issue I would prefer for the time being not adding descriptions to the schema. In the future we will do it but only when we have a tool to automatically generate documentation from schema definitions ... what do you think? |
@@ -0,0 +1,199 @@ | |||
{ | |||
"namespace": "Device", | |||
"name": "Device", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be named 'entityType'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change apply for both attributes or just to name attribute?
We think about a namespace to represent a category of problem domain.
For example: Thing:Device, Environment:Air:AirQualityObserved (the namespace separator ":" is just a suggestion may / or _ can be a better choice).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change 'namespace' by 'module' and 'name' by 'entityType'
"category": { | ||
"descr": "See attribute category from DeviceModel. Optional but recommended to optimize queries.", | ||
"type": "TextList", | ||
"allowedvalues": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be allowedValues
"mnc": { | ||
"descr": "This property identifies the Mobile Network Code (MNC) of the network the device is attached to. The MNC is used in combination with a Mobile Country Code (MCC) (also known as a \"MCC / MNC tuple\") to uniquely identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and 3G / 4G public land mobile networks and some satellite mobile networks.", | ||
"type": "Text", | ||
"allowedvalues": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the meaning of allowedvalues '*' here? If any value is allowed, then no need to say anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, if allowedValues attribute is not present any value of a given type ca be applied.
"name": "Device", | ||
"attributes": { | ||
"id": { | ||
"descr": "Unique identifier.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the future this should be description
instead of descr
}, | ||
"serialNumber": { | ||
"descr": "The serial number assigned by the manufacturer.", | ||
"type": "serialNumber", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't catch that, whats wrong? ☕️
"descr": "The provider of the device.", | ||
"type": "provider", | ||
"allowedvalues": { | ||
"normative": "https://schema.org/provider" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disagree here, normative references has nothing to do with allowedValues. allowedValues has to do with enumerations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with that, but how do will we represent normative reference?
The machine can't use that because a normative can be any schema, documentation, RF, in any format.
But it can be used to advise to user/developer which value should be used for this attribute.
Maybe:
"provider": {
"description": "The provider of the device.",
"type": "provider",
"normative": "https://schema.org/provider"
},
}, | ||
"refDeviceModel": { | ||
"descr": "The device's model.", | ||
"type": "Text", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer here to be explicit and say Reference
to entity of type DeviceModel.
- allowedvalues should be allowedValues - Remove allowedvalues '*' "If any value is allowed, then no need to say anything"
thanks for implementing some of the changes, but as I said before, at this stage, please remove descriptions, as we don't want to have descriptions duplicated in two different files |
"controlledAsset": { | ||
"description": "The asset(s) (building, object, etc.) controlled by the device.", | ||
"type": "TextList", | ||
"allowedValues": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we call this type "Reference" ?
"description": "Location of this device represented by a GeoJSON geometry of type point.", | ||
"type": "geo:json", | ||
"allowedValues": { | ||
"normative": "https://tools.ietf.org/html/rfc7946" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normative better as a direct child of location
"description": "A mnemonic name given to the device.", | ||
"type": "name", | ||
"allowedValues": { | ||
"normative": "https://schema.org/name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
"description": "Device's description.", | ||
"type": "description", | ||
"allowedValues": { | ||
"normative": "https://schema.org/description" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
"description": "The hardware version of this device.", | ||
"type": "Text" | ||
}, | ||
"hardwareVersion": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicated please check and validate
"description": "The serial number assigned by the manufacturer.", | ||
"type": "serialNumber", | ||
"allowedValues": { | ||
"normative": "https://schema.org/serialNumber" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
"description": "The provider of the device.", | ||
"type": "provider", | ||
"allowedValues": { | ||
"normative": "https://schema.org/provider" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
}, | ||
"refDeviceModel": { | ||
"description": "Reference to entity of type DeviceModel.", | ||
"type": "Text", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference
@LeonanCarvalho we have resumed the work on JSON Schema and today we landed infra and a JSON Schema for WeatherObserved. If you are still interested in working on this please refresh this work. Otherwise we will take your input and adapt it. This week we plan to work on 'WeatherForecast' and 'AirQualityObserved' . thanks! |
@jmcanterafonseca Sorry for my delay to keep it updated. I want to be involved in the development of this schemas, but I do not know if I can update these models as quickly as I would like. Even a bit of inexperienced with Github. If you want to adapt it feel free to do so. I'll keep watching the repository and I will make contributions when possible. What could I do immediately to update this work? |
@LeonanCarvalho I would be happier if these schemas are developed by you, guys. We want to encourage community participation. We plan to work immediately on Weather and environment schemas. As you are working on different schemas this can be compatible with your development pace. In order to land your work, please could have a look at https://github.com/Fiware/dataModels/blob/master/Weather/WeatherObserved/schema.json and try to align. As I said, we now focus on providing schemas and keeping doc in the md. in the future we plan to reconcile both artefacts but for the moment, it is enough with having structure and validation rules on the schemas. please let me know thanks! |
@jmcanterafonseca I looked at WeatherObserved schema and It's good enough, the document is abiding by a standard, I believe that it's not difficult to consume it as proposed at #76 To involve the community, I think it will enforce a team work from @FIWARE developers (Orion Context Broker,Cygnus, Proton, etc) to consume and implement this schemas. Here have a huge list of Implementations written in different languages. |
closing this. we will be using standard JSON Schema descriptions. |
regarding to issue #76