Skip to content

Commit 58832f9

Browse files
author
Ma Shimiao
committed
config-linux: remove unneeded null for array
Signed-off-by: Ma Shimiao <[email protected]>
1 parent a04cce9 commit 58832f9

File tree

1 file changed

+54
-133
lines changed

1 file changed

+54
-133
lines changed

schema/config-linux.json

Lines changed: 54 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,24 @@
66
"properties": {
77
"devices": {
88
"id": "https://opencontainers.org/schema/bundle/linux/devices",
9-
"oneOf": [
10-
{
11-
"type": "array",
12-
"items": {
13-
"$ref": "defs-linux.json#/definitions/Device"
14-
}
15-
},
16-
{
17-
"type": "null"
18-
}
19-
]
9+
"type": "array",
10+
"items": {
11+
"$ref": "defs-linux.json#/definitions/Device"
12+
}
2013
},
2114
"uidMappings": {
2215
"id": "https://opencontainers.org/schema/bundle/linux/uidMappings",
23-
"oneOf": [
24-
{
25-
"type": "array",
26-
"items": {
27-
"$ref": "defs.json#/definitions/IDMapping"
28-
}
29-
},
30-
{
31-
"type": "null"
32-
}
33-
]
16+
"type": "array",
17+
"items": {
18+
"$ref": "defs.json#/definitions/IDMapping"
19+
}
3420
},
3521
"gidMappings": {
3622
"id": "https://opencontainers.org/schema/bundle/linux/gidMappings",
37-
"oneOf": [
38-
{
39-
"type": "array",
40-
"items": {
41-
"$ref": "defs.json#/definitions/IDMapping"
42-
}
43-
},
44-
{
45-
"type": "null"
46-
}
47-
]
23+
"type": "array",
24+
"items": {
25+
"$ref": "defs.json#/definitions/IDMapping"
26+
}
4827
},
4928
"namespaces": {
5029
"id": "https://opencontainers.org/schema/bundle/linux/namespaces",
@@ -63,17 +42,10 @@
6342
"properties": {
6443
"devices": {
6544
"id": "https://opencontainers.org/schema/bundle/linux/resources/devices",
66-
"oneOf": [
67-
{
68-
"type": "array",
69-
"items": {
70-
"$ref": "defs-linux.json#/definitions/DeviceCgroup"
71-
}
72-
},
73-
{
74-
"type": "null"
75-
}
76-
]
45+
"type": "array",
46+
"items": {
47+
"$ref": "defs-linux.json#/definitions/DeviceCgroup"
48+
}
7749
},
7850
"oomScoreAdj": {
7951
"id": "https://opencontainers.org/schema/bundle/linux/resources/oomScoreAdj",
@@ -108,61 +80,31 @@
10880
},
10981
"blkioThrottleReadBpsDevice": {
11082
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadBpsDevice",
111-
"oneOf": [
112-
{
113-
"type": "array",
114-
"items": [
115-
{
116-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
117-
}
118-
]
119-
},
120-
{
121-
"type": "null"
122-
}
123-
]
83+
"type": "array",
84+
"items": {
85+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
86+
}
12487
},
12588
"blkioThrottleWriteBpsDevice": {
12689
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteBpsDevice",
127-
"oneOf": [
128-
{
129-
"type": "array",
130-
"items": {
131-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
132-
}
133-
},
134-
{
135-
"type": "null"
136-
}
137-
]
90+
"type": "array",
91+
"items": {
92+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
93+
}
13894
},
13995
"blkioThrottleReadIopsDevice": {
14096
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadIopsDevice",
141-
"oneOf": [
142-
{
143-
"type": "array",
144-
"items": {
145-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
146-
}
147-
},
148-
{
149-
"type": "null"
150-
}
151-
]
97+
"type": "array",
98+
"items": {
99+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
100+
}
152101
},
153102
"blkioThrottleWriteIopsDevice": {
154103
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteIopsDevice",
155-
"oneOf": [
156-
{
157-
"type": "array",
158-
"items": {
159-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
160-
}
161-
},
162-
{
163-
"type": "null"
164-
}
165-
]
104+
"type": "array",
105+
"items": {
106+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
107+
}
166108
},
167109
"blkioWeightDevice": {
168110
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
@@ -213,29 +155,22 @@
213155
},
214156
"hugepageLimits": {
215157
"id": "https://opencontainers.org/schema/bundle/linux/resources/hugepageLimits",
216-
"oneOf": [
217-
{
218-
"type": "array",
219-
"items": {
220-
"type": "object",
221-
"properties": {
222-
"pageSize": {
223-
"type": "string"
224-
},
225-
"limit": {
226-
"$ref": "defs.json#/definitions/int64"
227-
}
228-
},
229-
"required": [
230-
"pageSize",
231-
"limit"
232-
]
158+
"type": "array",
159+
"items": {
160+
"type": "object",
161+
"properties": {
162+
"pageSize": {
163+
"type": "string"
164+
},
165+
"limit": {
166+
"$ref": "defs.json#/definitions/int64"
233167
}
234168
},
235-
{
236-
"type": "null"
237-
}
238-
]
169+
"required": [
170+
"pageSize",
171+
"limit"
172+
]
173+
}
239174
},
240175
"memory": {
241176
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory",
@@ -273,17 +208,10 @@
273208
},
274209
"priorities": {
275210
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/priorities",
276-
"oneOf": [
277-
{
278-
"type": "array",
279-
"items": {
280-
"$ref": "defs-linux.json#/definitions/NetworkInterfacePriority"
281-
}
282-
},
283-
{
284-
"type": "null"
285-
}
286-
]
211+
"type": "array",
212+
"items": {
213+
"$ref": "defs-linux.json#/definitions/NetworkInterfacePriority"
214+
}
287215
}
288216
}
289217
}
@@ -313,17 +241,10 @@
313241
},
314242
"architectures": {
315243
"id": "https://opencontainers.org/schema/bundle/linux/seccomp/architectures",
316-
"oneOf": [
317-
{
318-
"type": "array",
319-
"items": {
320-
"$ref": "defs-linux.json#/definitions/SeccompArch"
321-
}
322-
},
323-
{
324-
"type": "null"
325-
}
326-
]
244+
"type": "array",
245+
"items": {
246+
"$ref": "defs-linux.json#/definitions/SeccompArch"
247+
}
327248
},
328249
"syscalls": {
329250
"id": "https://opencontainers.org/schema/bundle/linux/seccomp/syscalls",

0 commit comments

Comments
 (0)