forked from oamg/schema-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pes-events-schema-test.json
201 lines (201 loc) · 6.32 KB
/
pes-events-schema-test.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{
"$id": "https://raw.githubusercontent.com/oamg/schema-test/main/pes-events-schema-test.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Package Evolution Service - Events",
"type": "object",
"required": [
"legal_notice",
"timestamp",
"packageinfo",
"provided_data_streams"
],
"properties": {
"legal_notice": {
"type": "string",
"title": "Just a legal notice...",
"examples": ["Copyright YYYY ...."]
},
"timestamp": {
"type": "string",
"title": "The datetime of the last data update.",
"description": "The expected format: YYYYMMDDhhmmZ (date -u \"+%Y%m%d%H%MZ\")",
"pattern": "^[0-9]{12}Z$",
"examples": [
"202107141655Z"
]
},
"provided_data_streams": {
"type": "array",
"title": "The list of data streams provided by this data file.",
"description": "Data streams is list of X.Y strings where X is mandatory is saying with what leapp-repository packages the data is compatible, Y is more informative for easier data identification..",
"examples": [
["1.0"],
["1.2", "2.0"]
],
"items": {
"type": "string",
"title": "Provided data stream",
"pattern": "^[1-9][0-9]*.[0-9]+$",
"examples": ["1.0", "1.1", "2.5", "10.100"]
}
},
"packageinfo": {
"type": "array",
"title": "List of PES events",
"items": {
"type": "object",
"title": "The PES event",
"description": "The PES event describes what happened with package(s).",
"required": [
"action",
"id",
"initial_release",
"release",
"in_packageset",
"out_packageset",
"modulestream_maps",
"architectures"
],
"properties": {
"action": {
"type": "integer",
"title": "Type (action) of the PES event representing what is happening with the package.",
"description": "0 = Removal, 1 = Presence, 2 = Deprecation, 3 = Replacement, 4 = Split, 5 = Merge, 6 = Move, 7 = Rename"
},
"id": {
"type": "integer",
"description": "Unique ID of the event, used for debugging"
},
"initial_release": {
"$ref": "#/$defs/generic_release",
"type": [ "null", "object" ],
"title": "The initial release from which package(s) evolved.",
"description": "It is used when the event needs to refer against which release the change happens. E.g. in case of removal it's null as is not important."
},
"release": {
"$ref": "#/$defs/generic_release",
"type": "object",
"title": "The release in which the change happened.",
"description": "E.g. if package has been removed in RHEL 8.0, set the release RHEL 8.0"
},
"in_packageset": {
"type": "object",
"description": "Describes one or more input packages, depending on the type of the event",
"properties": {
"package": {
"$ref": "#/$defs/package"
}
},
"required": [
"package"
]
},
"out_packageset": {
"type": [ "null", "object" ],
"description": "Describes one or more output packages, depending on the type of the event",
"properties": {
"package": {
"$ref": "#/$defs/package"
}
},
"required": [
"package"
]
},
"modulestream_maps": {
"type": "array",
"description": "Describes the upgraded path of the specified modules",
"items": {
"type": "object",
"properties": {
"in_modulestream": { "$ref": "#/$defs/modulestream" },
"out_modulestream": { "$ref": "#/$defs/modulestream" }
},
"required": [
"in_modulestream",
"out_modulestream"
]
}
},
"architectures": {
"type": "array",
"description": "Describes all applicable architectures for the event",
"items": {
"type": "string"
}
}
}
}
}
},
"$defs": {
"generic_release": {
"title": "Represents a release of a specified operating system.",
"required": [
"os_name",
"major_version",
"minor_version"
],
"properties": {
"os_name": {
"type": "string",
"description": "Name of the operating system release",
"examples": ["RHEL", "Fedora", "Centos"]
},
"major_version": {
"type": "integer",
"description": "Major version of the release"
},
"minor_version": {
"type": "integer",
"description": "Minor version of the release"
}
}
},
"modulestream": {
"description": "Describes the module:stream object",
"type": [
"object",
"null"
],
"properties": {
"name": { "type": "string" },
"stream": { "type": "string" }
},
"required": [
"name",
"stream"
]
},
"package": {
"description": "List of binary packages belonging to a packageset",
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"repository",
"modulestreams"
],
"properties": {
"name": {
"type": "string",
"title": "The name of the binary RPM."
},
"repository": {
"type": "string",
"title": "The PES ID used in the PES database.",
"description": "The PES ID refers to a set of repositories which represent alternatives of one repository. E.g. BaseOS has a little different repository ID for every architecture, channel, ..."
},
"modulestreams": {
"type": "array",
"description": "Describes the modules the package is located in",
"items": {
"$ref": "#/$defs/modulestream"
}
}
}
}
}
}
}