Skip to content

Commit

Permalink
Schema correction for ActC (#377)
Browse files Browse the repository at this point in the history
* Correct ActC schema regarding additionalProperties spelling
  • Loading branch information
e-backmark-ericsson authored Jan 17, 2024
1 parent d736d6e commit 1b9a637
Show file tree
Hide file tree
Showing 3 changed files with 311 additions and 1 deletion.
121 changes: 121 additions & 0 deletions definitions/EiffelActivityCanceledEvent/4.0.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Copyright 2017-2024 Ericsson AB and others.
# For a full list of individual contributors, please see the commit history.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
$schema: http://json-schema.org/draft-04/schema#
_abbrev: ActC
_description: The EiffelActivityCanceledEvent signals that a previously
triggered activity execution has been canceled _before it has started_.
This is typically used in queuing situations where a queued execution
is dequeued. It is recommended that __CAUSE__ links be used to indicate
the reason.
type: object
properties:
meta:
$ref: ../EiffelMetaProperty/3.1.0.yml
data:
type: object
properties:
reason:
_description: Any human readable information as to the reason
for dequeueing.
type: string
customData:
type: array
items:
$ref: ../EiffelCustomDataProperty/1.0.0.yml
additionalProperties: false
links:
type: array
items:
$ref: ../EiffelEventLink/1.1.1.yml
required:
- meta
- data
- links
additionalProperties: false
_links:
ACTIVITY_EXECUTION:
description: Declares the activity execution that was canceled.
In other words, [EiffelActivityTriggeredEvent](../eiffel-vocabulary/EiffelActivityTriggeredEvent.md)
acts as a handle for the activity execution. This differs from
__CONTEXT__. In __ACTIVITY_EXECUTION__ the source carries information
pertaining to the target (i.e. the activity started, finished
or was canceled). In __CONTEXT__, on the other hand, the source
constitutes a subset of the target (e.g. this test case was executed
as part of that activity or test suite).
required: true
multiple: false
targets:
any_type: false
types:
- EiffelActivityTriggeredEvent
CAUSE:
description: While for most events it is recommended that __CAUSE__
SHOULD not be used in conjunction with __CONTEXT__, EiffelActivityCanceledEvent
is a special case as it represents a deviation from previous
intention. Therefore it is recommended that __CAUSE__ always
be included where applicable.
required: false
multiple: true
targets:
any_type: true
types: []
CONTEXT:
description: Identifies the activity or test suite of which this
event constitutes a part.
required: false
multiple: false
targets:
any_type: false
types:
- EiffelActivityTriggeredEvent
- EiffelTestSuiteStartedEvent
FLOW_CONTEXT:
description: 'Identifies the flow context of the event: which is
the continuous integration and delivery flow in which this occurred
– e.g. which product, project, track or version this is applicable
to.'
required: false
multiple: true
targets:
any_type: false
types:
- EiffelFlowContextDefinedEvent
_history:
- version: 4.0.0
changes: Fix bug in schema regarding additionalProperties (see [Issue 376](https://github.com/eiffel-community/eiffel/issues/376)).
- version: 3.2.0
introduced_in: edition-arica
changes: Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)).
- version: 3.1.0
introduced_in: edition-lyon
changes: Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)).
- version: 3.0.0
introduced_in: edition-agen
changes: Improved information integrity protection (see [Issue
185](https://github.com/eiffel-community/eiffel/issues/185)).
- version: 2.0.0
introduced_in: edition-agen
changes: Introduced purl identifiers instead of GAVs (see [Issue
182](https://github.com/eiffel-community/eiffel/issues/182))
- version: 1.1.0
introduced_in: edition-toulouse
changes: Multiple links of type FLOW_CONTEXT allowed.
- version: 1.0.0
introduced_in: edition-bordeaux
changes: Initial version.
_examples:
- title: Simple example
url: ../examples/events/EiffelActivityCanceledEvent/simple.json
3 changes: 2 additions & 1 deletion eiffel-vocabulary/EiffelActivityCanceledEvent.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!---
This file was generated from ../definitions/EiffelActivityCanceledEvent/3.2.0.yml.
This file was generated from ../definitions/EiffelActivityCanceledEvent/4.0.0.yml.
See that file for a copyright notice.
--->

Expand Down Expand Up @@ -177,6 +177,7 @@ __Description:__ A URI pointing at a location from where the schema used when cr

| Version | Introduced in | Changes |
| ------- | ------------- | ------- |
| 4.0.0 | Not yet released in an edition | Fix bug in schema regarding additionalProperties (see [Issue 376](https://github.com/eiffel-community/eiffel/issues/376)). |
| 3.2.0 | [edition-arica](../../../tree/edition-arica) | Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)). |
| 3.1.0 | [edition-lyon](../../../tree/edition-lyon) | Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)). |
| 3.0.0 | [edition-agen](../../../tree/edition-agen) | Improved information integrity protection (see [Issue 185](https://github.com/eiffel-community/eiffel/issues/185)). |
Expand Down
188 changes: 188 additions & 0 deletions schemas/EiffelActivityCanceledEvent/4.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"$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": [
"EiffelActivityCanceledEvent"
]
},
"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"
]
},
"schemaUri": {
"type": "string"
}
},
"required": [
"id",
"type",
"version",
"time"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string"
},
"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}$"
},
"domainId": {
"type": "string"
}
},
"required": [
"type",
"target"
],
"additionalProperties": false
}
}
},
"required": [
"meta",
"data",
"links"
],
"additionalProperties": false
}

0 comments on commit 1b9a637

Please sign in to comment.