Skip to content

Commit 97af736

Browse files
committed
Add optional name qualifier to location objects in ArtP
With the addition of data.locations.name it'll be possible to connect a URI in an ArtP event to the corresponding file in a multi-file ArtC event. If this connection can't be made multi-file artifacts force consumers to use heuristics to figure out how to download a particular file.
1 parent 7569fa6 commit 97af736

File tree

3 files changed

+233
-1
lines changed

3 files changed

+233
-1
lines changed

eiffel-vocabulary/EiffelArtifactPublishedEvent.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
Copyright 2017-2018 Ericsson AB.
2+
Copyright 2017-2020 Ericsson AB and others.
33
For a full list of individual contributors, please see the commit history.
44
55
Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,6 +24,11 @@ __Type:__ Object[]
2424
__Required:__ Yes
2525
__Description:__ A list of locations at which the artifact may be retrieved.
2626

27+
#### data.locations.name
28+
__Type:__ String
29+
__Required:__ No
30+
__Description:__ Identifies the name of the file within the artifact for which this location provides the URI. Must correspond to a __data.fileInformation.name__ value in the [EiffelArtifactCreatedEvent](./EiffelArtifactCreatedEvent.md) connected via the __ARTIFACT__ link.
31+
2732
#### data.locations.type
2833
__Type:__ String
2934
__Required:__ Yes
@@ -194,6 +199,7 @@ __Description:__ The number of the event within the named sequence.
194199
## Version History
195200
| Version | Introduced in | Changes |
196201
| --------- | ------------------------------------------------------ | --------------------------------------- |
202+
| 3.1.0 | Current version | Added name qualifier for artifact locations (see [Issue 248](https://github.com/eiffel-community/eiffel/issues/248)) |
197203
| 3.0.0 | [edition-agen](../../../tree/edition-agen) | Improved information integrity protection | (see [Issue 185](https://github.com/eiffel-community/eiffel/issues/185)) |
198204
| 2.0.0 | [dc5ec6f](../../../blob/dc5ec6fb87e293eeffe88fdafe698eec0f5a2c89/eiffel-vocabulary/EiffelArtifactPublishedEvent.md) | Introduced purl identifiers instead of GAVs (see [Issue 182](https://github.com/eiffel-community/eiffel/issues/182)) |
199205
| 1.1.0 | [edition-toulouse](../../../tree/edition-toulouse) | Multiple links of type FLOW_CONTEXT allowed. |
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"meta": {
3+
"type": "EiffelArtifactPublishedEvent",
4+
"version": "3.1.0",
5+
"time": 1234567890,
6+
"id": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee0"
7+
},
8+
"data": {
9+
"locations": [
10+
{
11+
"name": "file1",
12+
"type": "PLAIN",
13+
"uri": "https://example.com/file1"
14+
},
15+
{
16+
"name": "file2",
17+
"type": "PLAIN",
18+
"uri": "https://example.com/file2"
19+
}
20+
]
21+
},
22+
"links": [
23+
{
24+
"type": "CONTEXT",
25+
"target": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee1"
26+
},
27+
{
28+
"type": "ARTIFACT",
29+
"target": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee2"
30+
}
31+
]
32+
}
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"meta": {
6+
"type": "object",
7+
"properties": {
8+
"id": {
9+
"type": "string",
10+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
11+
},
12+
"type": {
13+
"type": "string",
14+
"enum": ["EiffelArtifactPublishedEvent"]
15+
},
16+
"version": {
17+
"type": "string",
18+
"enum": [ "3.1.0" ],
19+
"default": "3.1.0"
20+
},
21+
"time": {
22+
"type": "integer"
23+
},
24+
"tags": {
25+
"type": "array",
26+
"items": {
27+
"type": "string"
28+
}
29+
},
30+
"source": {
31+
"type": "object",
32+
"properties": {
33+
"domainId": {
34+
"type": "string"
35+
},
36+
"host": {
37+
"type": "string"
38+
},
39+
"name": {
40+
"type": "string"
41+
},
42+
"serializer": {
43+
"type": "string",
44+
"pattern": "^pkg:"
45+
},
46+
"uri": {
47+
"type": "string"
48+
}
49+
},
50+
"additionalProperties": false
51+
},
52+
"security": {
53+
"type": "object",
54+
"properties": {
55+
"authorIdentity": {
56+
"type": "string"
57+
},
58+
"integrityProtection": {
59+
"type": "object",
60+
"properties": {
61+
"signature": {
62+
"type": "string"
63+
},
64+
"alg": {
65+
"type": "string",
66+
"enum": ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512"]
67+
},
68+
"publicKey": {
69+
"type": "string"
70+
}
71+
},
72+
"required": [
73+
"signature",
74+
"alg"
75+
],
76+
"additionalProperties": false
77+
},
78+
"sequenceProtection": {
79+
"type": "array",
80+
"items": {
81+
"type": "object",
82+
"properties": {
83+
"sequenceName": {
84+
"type": "string"
85+
},
86+
"position": {
87+
"type": "integer"
88+
}
89+
},
90+
"additionalProperties": false,
91+
"required": [
92+
"sequenceName",
93+
"position"
94+
]
95+
}
96+
}
97+
},
98+
"additionalProperties": false,
99+
"required": [
100+
"authorIdentity"
101+
]
102+
}
103+
},
104+
"required": [
105+
"id",
106+
"type",
107+
"version",
108+
"time"
109+
],
110+
"additionalProperties": false
111+
},
112+
"data": {
113+
"type": "object",
114+
"properties": {
115+
"locations": {
116+
"type": "array",
117+
"items": {
118+
"type": "object",
119+
"properties": {
120+
"name": {
121+
"type": "string"
122+
},
123+
"type": {
124+
"type": "string",
125+
"enum": [
126+
"ARTIFACTORY",
127+
"NEXUS",
128+
"PLAIN",
129+
"OTHER"
130+
]
131+
},
132+
"uri": {
133+
"type": "string"
134+
}
135+
},
136+
"required": [
137+
"type",
138+
"uri"
139+
],
140+
"additionalProperties": false
141+
}
142+
},
143+
"customData": {
144+
"type": "array",
145+
"items": {
146+
"type": "object",
147+
"properties": {
148+
"key": {
149+
"type": "string"
150+
},
151+
"value": {
152+
}
153+
},
154+
"required": [
155+
"key",
156+
"value"
157+
],
158+
"additionalProperties": false
159+
}
160+
}
161+
},
162+
"required": [
163+
"locations"
164+
],
165+
"additionalProperties": false
166+
},
167+
"links": {
168+
"type": "array",
169+
"items": {
170+
"type": "object",
171+
"properties": {
172+
"type": {
173+
"type": "string"
174+
},
175+
"target": {
176+
"type": "string",
177+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
178+
}
179+
},
180+
"required": [
181+
"type",
182+
"target"
183+
],
184+
"additionalProperties": false
185+
}
186+
}
187+
},
188+
"required": [
189+
"meta",
190+
"data",
191+
"links"
192+
],
193+
"additionalProperties": false
194+
}

0 commit comments

Comments
 (0)