Skip to content

Commit

Permalink
Move schema.yaml => model.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jun 29, 2020
1 parent e42e057 commit 6dc47cd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
This entity models an alert and could be used to send alerts related to traffic jam, accidents, weather conditions, high level of pollutants and so on. T
he purpose of the model is to support the generation of notifications for a user or trigger other actions, based on such alerts.

An alert is generated by a specific situation. The main features of an alert is that it is not predictable and it is not a recurrent data.
That means that an alert could be an accident or a high level of pollutants measure, additionally it could a patient falling over or
An alert is generated by a specific situation. The main features of an alert is that it is not predictable and it is not a recurrent data.
That means that an alert could be an accident or a high level of pollutants measure, additionally it could a patient falling over or
a car driving in the wrong direction on a highway.

Some examples of context data are: type of alert (traffic, weather, security, and pollution, etc.), severity, location and so on.

The main entities identified are:

- [`Alert`](https://swagger.lab.fiware.org/?url=https://raw.githubusercontent.com/smart-data-models/dataModel.Alert/master/alert/swagger.yaml).
- [`Alert`](https://swagger.lab.fiware.org/?url=https://smart-data-models.github.io/dataModel.Alert/alert/swagger.yaml).
It represents an alert raised for an incident
6 changes: 3 additions & 3 deletions alert-schema.yaml → alert-model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AlertCommons:
- "http://schema.org/URL"
category:
$ref: >-
https://raw.githubusercontent.com/smart-data-models/dataModel.Alert/master/alert-schema.yaml#/AlertCategory
https://smart-data-models.github.io/dataModel.Alert/alert-model.yaml#/AlertCategory
dateIssued:
x-ngsi:
type: Property
Expand All @@ -21,7 +21,7 @@ AlertCommons:
format: date-time
description:
$ref: >-
https://raw.githubusercontent.com/smart-data-models/data-models/master/ngsi-ld.yaml#/description
https://smart-data-models.github.io/data-models/ngsi-ld.yaml#/description
validFrom:
x-ngsi:
type: Property
Expand All @@ -38,7 +38,7 @@ AlertCommons:
description: The end date of validity of the alert in ISO8601 UTC format.
severity:
$ref: >-
https://raw.githubusercontent.com/smart-data-models/dataModel.Alert/master/alert-schema.yaml#/AlertSeverity
https://smart-data-models.github.io/dataModel.Alert/alert-model.yaml#/AlertSeverity
data:
type: object
description: used to carry additional data for the alert
Expand Down
18 changes: 9 additions & 9 deletions alert/schema.yaml → alert/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Alert:
- id
allOf:
- $ref: >-
https://raw.githubusercontent.com/smart-data-models/data-models/master/ngsi-ld.yaml#/Common
https://smart-data-models.github.io/data-models/ngsi-ld.yaml#/Common
- $ref: >-
https://raw.githubusercontent.com/smart-data-models/dataModel.Alert/master/alert-schema.yaml#/AlertCommons
https://smart-data-models.github.io/dataModel.Alert/alert-model.yaml#/AlertCommons
type: object
description: |
This entity models an alert and could be used to send alerts related to traffic
Expand All @@ -25,13 +25,13 @@ Alert:
subCategory:
type: string
anyOf:
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/NaturalDisasterAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/HealthAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/SecurityAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/TrafficAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/EnvironmentAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/AgriculturalAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Weather/weather-schema.yaml#/WeatherAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/NaturalDisasterAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/HealthAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/SecurityAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/TrafficAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/EnvironmentAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/AgriculturalAlertCategories'
- $ref: 'https://smart-data-models.github.io/dataModel.Weather/weather-model.yaml#/WeatherAlertCategories'

TrafficAlertCategories:
type: string
Expand Down
24 changes: 12 additions & 12 deletions alert/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
components:
schemas:
Alert:
$ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/Alert'
$ref: 'https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/Alert'
AlertCategory:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert-schema.yaml#/AlertCategory
https://smart-data-models.github.io/dataModel.Alert/alert-model.yaml#/AlertCategory
AlertSeverity:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert-schema.yaml#/AlertSeverity
https://smart-data-models.github.io/dataModel.Alert/alert-model.yaml#/AlertSeverity
NaturalDisasterAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/NaturalDisasterAlertCategories
https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/NaturalDisasterAlertCategories
HealthAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/HealthAlertCategories
https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/HealthAlertCategories
SecurityAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/SecurityAlertCategories
https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/SecurityAlertCategories
TrafficAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/TrafficAlertCategories
https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/TrafficAlertCategories
EnvironmentAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/EnvironmentAlertCategories
https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/EnvironmentAlertCategories
AgriculturalAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Alert/alert/schema.yaml#/AgriculturalAlertCategories
https://smart-data-models.github.io/dataModel.Alert/alert/model.yaml#/AgriculturalAlertCategories
WeatherAlertCategories:
$ref: >-
https://smart-data-models.github.io/dataModel.Weather/weather-schema.yaml#/WeatherAlertCategories
https://smart-data-models.github.io/dataModel.Weather/weather-model.yaml#/WeatherAlertCategories
info:
Expand Down Expand Up @@ -71,12 +71,12 @@ paths:
summary: "Key-Values Pairs"
value:
-
$ref: "https://raw.githubusercontent.com/smart-data-models/dataModel.Alert/master/alert/example-1.json"
$ref: "https://smart-data-models.github.io/dataModel.Alert/alert/example-1.json"
normalized:
summary: "Normalized NGSI-LD"
value:
-
$ref: "https://raw.githubusercontent.com/smart-data-models/dataModel.Alert/master/alert/example-normalized-ld.jsonld"
$ref: "https://smart-data-models.github.io/dataModel.Alert/alert/example-normalized-ld.jsonld"
description: OK
tags:
- ngsi-ld
Expand Down

0 comments on commit 6dc47cd

Please sign in to comment.