-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bndbuild] Start to work on a JsonSchema file for IDE integration or …
…validation
- Loading branch information
Krusty/Benediction
committed
Nov 19, 2024
1 parent
a536cfe
commit 7f2a63e
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/cpcsdk/rust.cpclib/tree/master/cpclib-bndbuild/schema.json", | ||
"$defs": { | ||
"ListOfFiles": { | ||
"type": ["object", "array", "string"] | ||
}, | ||
|
||
"Constraint": { | ||
"type": "string" | ||
}, | ||
|
||
"Task": { | ||
"type": "string" | ||
}, | ||
|
||
"ListOfTasks": { | ||
"type": "array", | ||
"item": "#/$defs/Task" | ||
}, | ||
|
||
"OneOrSeveralTasks": { | ||
"anyOf": [{ "$ref": "#/$defs/ListOfTasks" }, { "$ref": "#/$defs/Task" }] | ||
}, | ||
|
||
"Rule": { | ||
"type": "object", | ||
"description": "The description of a rule", | ||
|
||
"patternProperties": { | ||
"^(tgt)|(target)|(build)$": { | ||
"$ref": "#/$defs/ListOfFiles", | ||
"description": "The list of targets" | ||
}, | ||
|
||
"^(dep)|(dependency)|(requires)$": { | ||
"$ref": "#/$defs/ListOfFiles", | ||
"description": "The list of targets" | ||
}, | ||
|
||
"^(cmd)|(command)|(launch)|(run)$": { | ||
"$ref": "#/$defs/OneOrSeveralTasks", | ||
"description": "The list of tasks to handle" | ||
}, | ||
|
||
"^help$": { | ||
"type": "string", | ||
"description": "Help about the current rule." | ||
}, | ||
|
||
"^phony$": { | ||
"type": "string" | ||
}, | ||
|
||
"^constraint$": { | ||
"$ref": "#/$defs/Constraint" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"title": "Bndbuild validation schema", | ||
"description": "Bndbuild configuration file", | ||
"type": "array", | ||
"items": { "$ref": "#/$defs/Rule" }, | ||
"minItems": 0 | ||
} |