smart-data-models / dataModel.Environment

Environment Data Model
Other
12 stars 15 forks source link

Add new IndoorEnvironmentObserved data model #10

Closed mgaggero closed 3 years ago

mgaggero commented 3 years ago

This PR introduces a data model to describe an observation of air and climate conditions and people count, for indoor use and in closed environment as rooms, classrooms, halls, laboratories.

albertoabellagarcia commented 3 years ago

This PR is missing a critical file, schema.json, that now is the source of truth and includes the specification. See here a complete example of a well-documented schema.json https://github.com/smart-data-models/dataModel.Energy/blob/master/ThreePhaseAcMeasurement/schema.json to check if the schema.json is right there is an automatic tool here https://smartdatamodels.org/index.php/data-models-contribution-api/

mgaggero commented 3 years ago

The file schema.json is already present. I have added some description to the properties and fixed the $refs (now they point to https://smart-data-models.github.io instead of https://fiware.github.io).

albertoabellagarcia commented 3 years ago

It is done quite well, only one issue on two relationships. Unfortunately, and due to our documentation system (allowing automatic update), Although you did it correctly from the standpoint of json schema, we need to include the description of the relationship in the json schema (the value of the $ref). So in example for refDevice it should be "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\w\-\.\{\}\$\+\*\[\]`|~^@!,:\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Model:'http://schema.org/URL. Description with more than 15 chars'

The anyOf is coming from the reference you have, and the description is what you have to care. Location cannot be documented (for the moment) we'll manage it soon. so don't care.

thanks See this for further info https://docs.google.com/presentation/d/e/2PACX-1vTs-Ng5dIAwkg91oTTUdt8ua7woBXhPnwavZ0FxgR8BsAI_Ek3C5q97Nd94HS8KhP-r_quD4H0fgyt3/pub?start=false&loop=false&delayms=3000#slide=id.p1

mgaggero commented 3 years ago

Ok, thank you. I have replaced refDevice and refPointOfInterest references with their definitions and I have added the related descriptions. I left Location as it is.

albertoabellagarcia commented 3 years ago

I've merged everything but the spec will be replaced by the official format