Skip to content

Commit 87fa485

Browse files
authored
[projmgr] Update schemas: accept boolean define, reject target-type in target-set project-context
1 parent d358115 commit 87fa485

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tools/projmgr/schemas/common.schema.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@
374374
},
375375
{
376376
"type": "number"
377+
},
378+
{
379+
"type": "boolean"
377380
}
378381
]
379382
}
@@ -441,6 +444,9 @@
441444
},
442445
{
443446
"type": "number"
447+
},
448+
{
449+
"type": "boolean"
444450
}
445451
]
446452
}
@@ -2370,10 +2376,15 @@
23702376
"uniqueItems": true,
23712377
"items": { "$ref": "#/definitions/TargetSetImageType" }
23722378
},
2379+
"TargetSetProjectContext": {
2380+
"description": "Project output with optional build-type: '<project_name>[.build_type]'.",
2381+
"type": "string",
2382+
"pattern": "^([^\\.\\+]+(\\.[a-zA-Z0-9_-]{1,32})?)$"
2383+
},
23732384
"TargetSetImageType": {
23742385
"type": "object",
23752386
"properties": {
2376-
"project-context": { "type": "string", "description": "Project output with optional build-type: '<project_name>[.buid_type]'." },
2387+
"project-context": { "$ref": "#/definitions/TargetSetProjectContext" },
23772388
"image": { "type": "string", "description": "Additional image file to load." },
23782389
"info": { "type": "string", "description": "Brief description of the image file." },
23792390
"type": { "enum": [ "elf", "hex", "bin", "lib" ], "description": "Specifies an explicit image type." },
@@ -2388,7 +2399,7 @@
23882399
]
23892400
},
23902401
"TargetSetDebuggerType": {
2391-
"title": "optimize:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#debugger",
2402+
"title": "debugger:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#debugger",
23922403
"description": "Debugger configuration for this set.",
23932404
"type": "object",
23942405
"properties": {
@@ -2402,7 +2413,7 @@
24022413
"required": ["name"]
24032414
},
24042415
"TargetSetLoadType": {
2405-
"title": "optimize:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#load",
2416+
"title": "load:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#load",
24062417
"description": "Specifies the load mode for the project output or image file.",
24072418
"enum": [ "image+symbols", "symbols", "image", "none" ]
24082419
},

0 commit comments

Comments
 (0)