schemas: reformat json files for consistencyo
Formatted with `js --indent 2 .`
This commit is contained in:
parent
1366976dd8
commit
e837ebba76
2 changed files with 153 additions and 73 deletions
|
|
@ -1,16 +1,18 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
"$id": "https://osbuild.org/schemas/osbuild1.json",
|
"$id": "https://osbuild.org/schemas/osbuild1.json",
|
||||||
|
|
||||||
"title": "OSBuild Manifest",
|
"title": "OSBuild Manifest",
|
||||||
"description": "OSBuild manifest describing a pipeline and all parameters",
|
"description": "OSBuild manifest describing a pipeline and all parameters",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"pipeline": { "$ref": "#/definitions/pipeline" },
|
"pipeline": {
|
||||||
"sources": { "$ref": "#/definitions/sources" }
|
"$ref": "#/definitions/pipeline"
|
||||||
|
},
|
||||||
|
"sources": {
|
||||||
|
"$ref": "#/definitions/sources"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"assembler": {
|
"assembler": {
|
||||||
"title": "Pipeline Assembler",
|
"title": "Pipeline Assembler",
|
||||||
|
|
@ -18,71 +20,90 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": { "type": "string" },
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [ "name" ]
|
"required": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"build": {
|
"build": {
|
||||||
"title": "Build Pipeline",
|
"title": "Build Pipeline",
|
||||||
"description": "Description of the build pipeline required to run stages",
|
"description": "Description of the build pipeline required to run stages",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"pipeline": { "$ref": "#/definitions/pipeline" },
|
"pipeline": {
|
||||||
"runner": { "type": "string" }
|
"$ref": "#/definitions/pipeline"
|
||||||
|
},
|
||||||
|
"runner": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"required": [ "pipeline", "runner" ]
|
"required": [
|
||||||
|
"pipeline",
|
||||||
|
"runner"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"title": "Pipeline Description",
|
"title": "Pipeline Description",
|
||||||
"description": "Full description of a pipeline to execute",
|
"description": "Full description of a pipeline to execute",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"assembler": { "$ref": "#/definitions/assembler" },
|
"assembler": {
|
||||||
"build": { "$ref": "#/definitions/build" },
|
"$ref": "#/definitions/assembler"
|
||||||
"stages": { "$ref": "#/definitions/stages" }
|
},
|
||||||
|
"build": {
|
||||||
|
"$ref": "#/definitions/build"
|
||||||
|
},
|
||||||
|
"stages": {
|
||||||
|
"$ref": "#/definitions/stages"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"source": {
|
"source": {
|
||||||
"title": "External Source",
|
"title": "External Source",
|
||||||
"description": "External source to be passed to the pipeline",
|
"description": "External source to be passed to the pipeline",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
|
|
||||||
"sources": {
|
"sources": {
|
||||||
"title": "Collection of External Sources",
|
"title": "Collection of External Sources",
|
||||||
"description": "Collection of external sources to be passed to the pipeline",
|
"description": "Collection of external sources to be passed to the pipeline",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": { "$ref": "#/definitions/source" }
|
"additionalProperties": {
|
||||||
|
"$ref": "#/definitions/source"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"stage": {
|
"stage": {
|
||||||
"title": "Pipeline Stage",
|
"title": "Pipeline Stage",
|
||||||
"description": "Single stage of a pipeline executing one step",
|
"description": "Single stage of a pipeline executing one step",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": { "type": "string" },
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [ "name" ]
|
"required": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"stages": {
|
"stages": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "$ref": "#/definitions/stage" }
|
"items": {
|
||||||
|
"$ref": "#/definitions/stage"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,43 +1,52 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
"$id": "https://osbuild.org/schemas/osbuild2.json",
|
"$id": "https://osbuild.org/schemas/osbuild2.json",
|
||||||
|
|
||||||
"title": "OSBuild Manifest",
|
"title": "OSBuild Manifest",
|
||||||
"description": "OSBuild manifest describing a pipeline and all parameters",
|
"description": "OSBuild manifest describing a pipeline and all parameters",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": ["version"],
|
"required": [
|
||||||
|
"version"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"pipelines": { "$ref": "#/definitions/pipelines" },
|
"pipelines": {
|
||||||
"sources": { "$ref": "#/definitions/sources" },
|
"$ref": "#/definitions/pipelines"
|
||||||
|
},
|
||||||
|
"sources": {
|
||||||
|
"$ref": "#/definitions/sources"
|
||||||
|
},
|
||||||
"version": {
|
"version": {
|
||||||
"enum": ["2"]
|
"enum": [
|
||||||
|
"2"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
|
||||||
"devices": {
|
"devices": {
|
||||||
"title": "Collection of devices for a stage",
|
"title": "Collection of devices for a stage",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"$ref": "#/definitions/device"
|
"$ref": "#/definitions/device"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"device": {
|
"device": {
|
||||||
"title": "Device for a stage",
|
"title": "Device for a stage",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": ["type"],
|
"required": [
|
||||||
|
"type"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"type": { "type": "string" },
|
"type": {
|
||||||
"parent": { "type": "string" },
|
"type": "string"
|
||||||
|
},
|
||||||
|
"parent": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"title": "Collection of inputs for a stage",
|
"title": "Collection of inputs for a stage",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|
@ -47,35 +56,54 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"input": {
|
"input": {
|
||||||
"title": "Single input for a stage",
|
"title": "Single input for a stage",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": ["type", "origin", "references"],
|
"required": [
|
||||||
|
"type",
|
||||||
|
"origin",
|
||||||
|
"references"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"type": { "type": "string" },
|
"type": {
|
||||||
"origin": { "enum": ["org.osbuild.source", "org.osbuild.pipeline"] },
|
"type": "string"
|
||||||
"references": { "$ref": "#/definitions/reference" },
|
},
|
||||||
|
"origin": {
|
||||||
|
"enum": [
|
||||||
|
"org.osbuild.source",
|
||||||
|
"org.osbuild.pipeline"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"references": {
|
||||||
|
"$ref": "#/definitions/reference"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"mounts": {
|
"mounts": {
|
||||||
"title": "Collection of mount points for a stage",
|
"title": "Collection of mount points for a stage",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "$ref": "#/definitions/mount"}
|
"items": {
|
||||||
|
"$ref": "#/definitions/mount"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"mount": {
|
"mount": {
|
||||||
"title": "Mount point for a stage",
|
"title": "Mount point for a stage",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": ["name", "type"],
|
"required": [
|
||||||
|
"name",
|
||||||
|
"type"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": { "type": "string" },
|
"name": {
|
||||||
"type": { "type": "string" },
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"source": {
|
"source": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -91,44 +119,61 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"pipelines": {
|
"pipelines": {
|
||||||
"title": "Collection of pipelines to execute",
|
"title": "Collection of pipelines to execute",
|
||||||
"description": "Array of pipelines to execute one after another",
|
"description": "Array of pipelines to execute one after another",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "$ref": "#/definitions/pipeline" }
|
"items": {
|
||||||
|
"$ref": "#/definitions/pipeline"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"title": "Pipeline Description",
|
"title": "Pipeline Description",
|
||||||
"description": "Full description of a pipeline to execute",
|
"description": "Full description of a pipeline to execute",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": { "type:": "string" },
|
"name": {
|
||||||
"build": { "type": "string" },
|
"type:": "string"
|
||||||
"runner": { "type": "string" },
|
},
|
||||||
"source-epoch": { "type": "integer" },
|
"build": {
|
||||||
"stages": { "$ref": "#/definitions/stages" }
|
"type": "string"
|
||||||
|
},
|
||||||
|
"runner": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source-epoch": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"stages": {
|
||||||
|
"$ref": "#/definitions/stages"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"reference": {
|
"reference": {
|
||||||
"oneOf":[
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "type": "string" }
|
"items": {
|
||||||
}, {
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["id"],
|
"required": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": { "type": "string" },
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
|
@ -138,50 +183,64 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"source": {
|
"source": {
|
||||||
"title": "External Source",
|
"title": "External Source",
|
||||||
"description": "External source to be passed to the pipeline",
|
"description": "External source to be passed to the pipeline",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"items": { "$ref": "#/definitions/reference" },
|
"items": {
|
||||||
|
"$ref": "#/definitions/reference"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["items"]
|
"required": [
|
||||||
|
"items"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"sources": {
|
"sources": {
|
||||||
"title": "Collection of External Sources",
|
"title": "Collection of External Sources",
|
||||||
"description": "Collection of external sources to be passed to the pipeline",
|
"description": "Collection of external sources to be passed to the pipeline",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": { "$ref": "#/definitions/source" }
|
"additionalProperties": {
|
||||||
|
"$ref": "#/definitions/source"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"stage": {
|
"stage": {
|
||||||
"title": "Pipeline Stage",
|
"title": "Pipeline Stage",
|
||||||
"description": "Single stage of a pipeline executing one step",
|
"description": "Single stage of a pipeline executing one step",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"type": { "type": "string" },
|
"type": {
|
||||||
"devices": { "$ref": "#/definitions/devices" },
|
"type": "string"
|
||||||
"inputs": {"$ref": "#/definitions/inputs" },
|
},
|
||||||
"mounts": {"$ref": "#/definitions/mounts" },
|
"devices": {
|
||||||
|
"$ref": "#/definitions/devices"
|
||||||
|
},
|
||||||
|
"inputs": {
|
||||||
|
"$ref": "#/definitions/inputs"
|
||||||
|
},
|
||||||
|
"mounts": {
|
||||||
|
"$ref": "#/definitions/mounts"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [ "type" ]
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"stages": {
|
"stages": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "$ref": "#/definitions/stage" }
|
"items": {
|
||||||
|
"$ref": "#/definitions/stage"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue