summaryrefslogtreecommitdiff
path: root/schemas/system.json-schema
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2016-02-20 13:38:54 +0000
committerSam Thursfield <sam@afuera.me.uk>2016-02-20 13:38:54 +0000
commit76833a2578c9830160486d011f7791ed8f763276 (patch)
tree39297d2494ad5c99bca7c10f1479e783a188ce5e /schemas/system.json-schema
parent1db74defd8ff6b622adb536509c3611d003e56dc (diff)
downloadspec-76833a2578c9830160486d011f7791ed8f763276.tar.gz
Don't put schemas into versioned subdirectories
This makes sense for build tools that want to support multiple versions of the definitions format, but it doesn't make sense here. You can look in the Git history for previous versions.
Diffstat (limited to 'schemas/system.json-schema')
-rw-r--r--schemas/system.json-schema59
1 files changed, 59 insertions, 0 deletions
diff --git a/schemas/system.json-schema b/schemas/system.json-schema
new file mode 100644
index 0000000..a2fc0c5
--- /dev/null
+++ b/schemas/system.json-schema
@@ -0,0 +1,59 @@
+$schema: http://json-schema.org/draft-04/schema#
+id: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/schemas/system.json-schema
+
+description: |
+ This is a JSON-Schema description of a 'system' .morph file, which is part of
+ the Baserock definitions YAML representation format.
+
+ This JSON-Schema file is valid for VERSION 7 of the Baserock definitions
+ YAML serialisation format.
+
+ The Baserock definitions format is the recommended way of representing
+ Baserock definitions on disk. The actual data model is described separately.
+ See https://wiki.baserock.org/definitions for more information.
+
+ This schema is represented as YAML, so that it can be edited more easily.
+ You may need to convert to JSON if using a JSON-Schema tool that expects
+ its input to be an actual string containing data serialised as JSON.
+
+definitions:
+ # In the Baserock data model, this becomes a list of links to StratumArtifact
+ # entities.
+ stratum-reference:
+ type: object
+
+ required: [ 'morph' ]
+ additionalProperties: false
+
+ properties:
+ name: { type: string }
+ morph: { type: string }
+ artifacts:
+ type: array
+ items: { type: string }
+
+
+# Corresponds to System in Baserock data model.
+system:
+type: object
+
+required: [ 'name', 'kind', 'strata' ]
+additionalProperties: false
+
+properties:
+ name: { type: string }
+ kind: { enum: [ "system" ] }
+ description: { type: string }
+
+ # Morph and YBD will only accept certain values for 'arch' based on
+ # hardcoded conditions in those tools.
+ arch: { type: string }
+
+ strata:
+ type: array
+ items:
+ $ref: "#/definitions/stratum-reference"
+
+ configuration-extensions:
+ type: array
+ items: { type: string }