Skip to content

Commit

Permalink
Update event schemas (#27)
Browse files Browse the repository at this point in the history
This adds ActS 4.0.0, ActT 4.0.0, ArtP 3.1.0 and CD 3.1.0 from
commit 951a594 of github.com/eiffel-community/eiffel. These schemas
will probably be baselined in a new Agen-2 edition of Eiffel.

Co-authored-by: Magnus Bäck <[email protected]>
  • Loading branch information
magnusbaeck and Magnus Bäck authored Jan 19, 2021
1 parent 60e0031 commit decc889
Show file tree
Hide file tree
Showing 8 changed files with 768 additions and 8 deletions.
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_activity_started_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 Axis Communications AB.
# Copyright 2019-2021 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -32,7 +32,7 @@ class EiffelActivityStartedData(EiffelBaseData):
class EiffelActivityStartedEvent(EiffelBaseEvent):
"""Eiffel activity started event."""

version = "3.0.0"
version = "4.0.0"

def __init__(self, version=None):
"""Initialize data, meta and links."""
Expand Down
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_activity_triggered_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 Axis Communications AB.
# Copyright 2019-2021 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -32,7 +32,7 @@ class EiffelActivityTriggeredData(EiffelBaseData):
class EiffelActivityTriggeredEvent(EiffelBaseEvent):
"""Eiffel activity triggered event."""

version = "3.0.0"
version = "4.0.0"

def __init__(self, version=None):
"""Initialize data, meta and links."""
Expand Down
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_artifact_published_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 Axis Communications AB.
# Copyright 2019-2021 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -32,7 +32,7 @@ class EiffelArtifactPublishedData(EiffelBaseData):
class EiffelArtifactPublishedEvent(EiffelBaseEvent):
"""Eiffel artifact published event."""

version = "3.0.0"
version = "3.1.0"

def __init__(self, version=None):
"""Initialize data, meta and links."""
Expand Down
4 changes: 2 additions & 2 deletions eiffellib/events/eiffel_composition_defined_event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 Axis Communications AB.
# Copyright 2019-2021 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
Expand Down Expand Up @@ -32,7 +32,7 @@ class EiffelCompositionDefinedData(EiffelBaseData):
class EiffelCompositionDefinedEvent(EiffelBaseEvent):
"""Eiffel composition defined event."""

version = "3.0.0"
version = "3.1.0"

def __init__(self, version=None):
"""Initialize data, meta and links."""
Expand Down
185 changes: 185 additions & 0 deletions eiffellib/schemas/EiffelActivityStartedEvent/4.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"type": {
"type": "string",
"enum": ["EiffelActivityStartedEvent"]
},
"version": {
"type": "string",
"enum": [ "4.0.0" ],
"default": "4.0.0"
},
"time": {
"type": "integer"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "object",
"properties": {
"domainId": {
"type": "string"
},
"host": {
"type": "string"
},
"name": {
"type": "string"
},
"serializer": {
"type": "string",
"pattern": "^pkg:"
},
"uri": {
"type": "string"
}
},
"additionalProperties": false
},
"security": {
"type": "object",
"properties": {
"authorIdentity": {
"type": "string"
},
"integrityProtection": {
"type": "object",
"properties": {
"signature": {
"type": "string"
},
"alg": {
"type": "string",
"enum": ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512"]
},
"publicKey": {
"type": "string"
}
},
"required": [
"signature",
"alg"
],
"additionalProperties": false
},
"sequenceProtection": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sequenceName": {
"type": "string"
},
"position": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"sequenceName",
"position"
]
}
}
},
"additionalProperties": false,
"required": [
"authorIdentity"
]
}
},
"required": [
"id",
"type",
"version",
"time"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"executionUri": {
"type": "string"
},
"liveLogs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"uri": {
"type": "string"
}
},
"required": [
"name",
"uri"
],
"additionalProperties": false
}
},
"customData": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
}
},
"required": [
"key",
"value"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"target": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
},
"required": [
"type",
"target"
],
"additionalProperties": false
}
}
},
"required": [
"meta",
"data",
"links"
],
"additionalProperties": false
}
Loading

0 comments on commit decc889

Please sign in to comment.