Skip to content

Commit 4c01ead

Browse files
feat: update schema
1 parent 62dc27a commit 4c01ead

File tree

5 files changed

+51
-33
lines changed

5 files changed

+51
-33
lines changed

.changeset/small-meals-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@json-types/compose": minor
3+
---
4+
5+
Update schema

packages/compose/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ import schema from "@json-types/compose/schema.json";
2222

2323
TypeScript types generated automatically every night and published when there are changes.
2424

25-
- Last change: 2025-01-23T01:41:38.539Z
25+
- Last change: 2025-01-25T01:37:20.833Z
2626
- Source URL: https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json

packages/compose/index.d.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,16 @@ export type EnvFile =
181181
}
182182
)[];
183183
export type LabelFile = string | string[];
184-
export type DefinitionsGpus = {
185-
capabilities?: ListOfStrings;
186-
count?: string | number;
187-
device_ids?: ListOfStrings;
188-
driver?: string;
189-
options?: ListOrDict;
190-
}[];
184+
export type DefinitionsGpus =
185+
| "all"
186+
| {
187+
capabilities?: ListOfStrings;
188+
count?: string | number;
189+
device_ids?: ListOfStrings;
190+
driver?: string;
191+
options?: ListOrDict;
192+
[k: string]: unknown;
193+
}[];
191194
/**
192195
* This interface was referenced by `PropertiesNetworks`'s JSON-Schema definition
193196
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".

packages/compose/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"compose-spec"
1515
],
1616
"x-json-types": {
17-
"lastChangeDate": "2025-01-23T01:41:38.539Z"
17+
"lastChangeDate": "2025-01-25T01:37:20.833Z"
1818
},
1919
"homepage": "https://github.com/swordev/json-types/tree/main/packages/compose",
2020
"bugs": {

packages/compose/schema.json

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,31 +1287,41 @@
12871287
},
12881288
"gpus": {
12891289
"id": "#/definitions/gpus",
1290-
"type": "array",
1291-
"items": {
1292-
"type": "object",
1293-
"properties": {
1294-
"capabilities": {
1295-
"$ref": "#/definitions/list_of_strings"
1296-
},
1297-
"count": {
1298-
"type": [
1299-
"string",
1300-
"integer"
1301-
]
1302-
},
1303-
"device_ids": {
1304-
"$ref": "#/definitions/list_of_strings"
1305-
},
1306-
"driver": {
1307-
"type": "string"
1308-
},
1309-
"options": {
1310-
"$ref": "#/definitions/list_or_dict"
1311-
}
1290+
"oneOf": [
1291+
{
1292+
"type": "string",
1293+
"enum": [
1294+
"all"
1295+
]
13121296
},
1313-
"additionalProperties": false
1314-
}
1297+
{
1298+
"type": "array",
1299+
"items": {
1300+
"type": "object",
1301+
"properties": {
1302+
"capabilities": {
1303+
"$ref": "#/definitions/list_of_strings"
1304+
},
1305+
"count": {
1306+
"type": [
1307+
"string",
1308+
"integer"
1309+
]
1310+
},
1311+
"device_ids": {
1312+
"$ref": "#/definitions/list_of_strings"
1313+
},
1314+
"driver": {
1315+
"type": "string"
1316+
},
1317+
"options": {
1318+
"$ref": "#/definitions/list_or_dict"
1319+
}
1320+
}
1321+
},
1322+
"additionalProperties": false
1323+
}
1324+
]
13151325
},
13161326
"include": {
13171327
"id": "#/definitions/include",

0 commit comments

Comments
 (0)