summaryrefslogtreecommitdiff
path: root/schemas/chunk.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/chunk.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/chunk.json-schema')
-rw-r--r--schemas/chunk.json-schema116
1 files changed, 116 insertions, 0 deletions
diff --git a/schemas/chunk.json-schema b/schemas/chunk.json-schema
new file mode 100644
index 0000000..8de2fb5
--- /dev/null
+++ b/schemas/chunk.json-schema
@@ -0,0 +1,116 @@
+$schema: http://json-schema.org/draft-04/schema#
+id: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/schemas/chunk.json-schema
+
+description: |
+ This is a JSON-Schema description of a 'chunk' .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:
+ # Corresponds to CommandSequence in Baserock data model.
+ command-sequence:
+ type: array
+ items: { type: string }
+
+ # Corresponds to DeviceNode in Baserock data model.
+ device-node:
+ type: object
+ required: [type, filename, gid, uid, major, minor, permissions]
+ properties:
+ type: { type: string }
+ filename: { type: string }
+ gid: { type: integer }
+ uid: { type: integer }
+ major: { type: integer }
+ minor: { type: integer }
+ permissions: { type: string }
+
+ # Defines one or more instances of ChunkArtifact from the Baserock data model.
+ split-rules:
+ type: array
+ items:
+ type: object
+
+ required: [artifact, include]
+ additionalProperties: false
+
+ properties:
+ artifact: {type: string}
+ include:
+ type: array
+ items:
+ type: string
+ format: regex
+
+ system-integration-commands:
+ type: object
+ patternProperties:
+ # The property name here should correspond to the name of the chunk's
+ # artifacts, probably the '-bins' artifact if you are using the normal
+ # splitting rules.
+ ^.*$:
+ type: object
+ patternProperties:
+ ^.*$:
+ $ref: "#/definitions/command-sequence"
+
+# Corresponds to Chunk in Baserock data model.
+type: object
+
+additionalProperties: false
+required: [ 'name', 'kind']
+
+properties:
+ name: { type: string }
+ kind: { enum: [ "chunk" ] }
+
+ description: { type: string }
+
+ build-system: { type: string }
+ max-jobs: { type: integer }
+
+ products:
+ $ref: "#/definitions/split-rules"
+
+ pre-configure-commands:
+ $ref: "#/definitions/command-sequence"
+ configure-commands:
+ $ref: "#/definitions/command-sequence"
+ post-configure-commands:
+ $ref: "#/definitions/command-sequence"
+ pre-build-commands:
+ $ref: "#/definitions/command-sequence"
+ build-commands:
+ $ref: "#/definitions/command-sequence"
+ post-build-commands:
+ $ref: "#/definitions/command-sequence"
+ pre-install-commands:
+ $ref: "#/definitions/command-sequence"
+ install-commands:
+ $ref: "#/definitions/command-sequence"
+ post-install-commands:
+ $ref: "#/definitions/command-sequence"
+ pre-strip-commands:
+ $ref: "#/definitions/command-sequence"
+ strip-commands:
+ $ref: "#/definitions/command-sequence"
+ post-strip-commands:
+ $ref: "#/definitions/command-sequence"
+
+ system-integration:
+ $ref: "#/definitions/system-integration-commands"
+
+ devices:
+ type: array
+ items:
+ $ref: "#/definitions/device-node"