fulgensfile-schema.json
{
"$id": "http://oglimmer.de/fulgensfile-schema",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "JSON Schema a Fulgensfile",
"type": "object",
"required": [ "config", "software" ],
"properties": {
"config": {
"$ref": "#/definitions/config"
},
"versions": {
"$ref": "#/definitions/versions"
},
"software": {
"$ref": "#/definitions/softwareType"
}
},
"additionalProperties": false,
"definitions": {
"config": {
"properties": {
"SchemaVersion": {
"type": "string"
},
"Name": {
"type": "string"
},
"Vagrant": {
"$ref": "#/definitions/config/definitions/Vagrant"
},
"UseHomeM2": {
"type": "boolean"
},
"BuildDependencies": {
"$ref": "#/definitions/config/definitions/BuildDependencies"
},
"Dependencycheck": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false,
"required": [ "Name", "SchemaVersion" ],
"definitions": {
"Vagrant": {
"properties": {
"Box": {
"type": "string"
},
"Install": {
"type": "string"
},
"BeforeInstall": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"AfterInstall": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false,
"required": [ "Box" ]
},
"BuildDependencies": {
"properties": {
"Apt": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"Npm": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
}
}
},
"versions": {
"patternProperties": {
".*": {
"properties": {
"Docker": {
"type": "string"
},
"JavaLocal": {
"type": "string"
},
"Download": {
"type": "string"
},
"TestedWith": {
"type": "string"
},
"KnownMax": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"softwareType": {
"patternProperties": {
".*": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/MvnType" },
{ "$ref": "#/definitions/MysqlType" },
{ "$ref": "#/definitions/CouchdbType" },
{ "$ref": "#/definitions/TomcatType" },
{ "$ref": "#/definitions/NodeType" },
{ "$ref": "#/definitions/JavaType" },
{ "$ref": "#/definitions/RedisType" },
{ "$ref": "#/definitions/ShellType" }
]
}
}
},
"MvnType": {
"properties": {
"Source": {
"enum": [ "mvn" ]
},
"Git": {
"type": "string"
},
"Dir": {
"type": "string"
},
"Mvn": {
"$ref": "#/definitions/MvnType/definitions/MvnSubType"
},
"Param": {
"$ref": "#/definitions/MvnType/definitions/Param"
},
"Artifact": {
"type": "string"
},
"BeforeBuild": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"AfterBuild": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"additionalProperties": false,
"required": [ "Source" ],
"definitions": {
"MvnSubType": {
"properties": {
"GoalIgnoreClean": {
"type": "boolean"
},
"Goal": {
"type": "string"
}
},
"additionalProperties": false,
"definitions": {
}
},
"Param": {
"properties": {
"Char": {
"type": "string"
},
"VariableName": {
"type": "string"
},
"Description": {
"type": "string"
}
},
"required": [ "Char", "VariableName", "Description" ],
"additionalProperties": false
}
}
},
"MysqlType": {
"properties": {
"Source": {
"enum": [ "mysql" ]
},
"Mysql": {
"$ref": "#/definitions/MysqlType/definitions/MysqlSubType"
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"BeforeStart": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"AfterStart": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"required": [ "Source" ],
"additionalProperties": true,
"definitions": {
"MysqlSubType": {
"properties": {
"Schema": {
"type": "string"
},
"Create": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"RootPassword": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"CouchdbType": {
"properties": {
"Source": {
"enum": [ "couchdb" ]
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"CouchDB": {
"anyOf": [
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/CouchdbType/definitions/CouchdbSubType"
}
}, {
"$ref": "#/definitions/CouchdbType/definitions/CouchdbSubType"
}
]
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"required": [ "Source" ],
"additionalProperties": false,
"definitions": {
"CouchdbSubType": {
"properties": {
"Schema": {
"type": "string"
},
"Create": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"required": [ "Schema" ],
"additionalProperties": false
}
}
},
"TomcatType": {
"properties": {
"Source": {
"enum": [ "tomcat" ]
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"Lib": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"Deploy": {
"type": "string"
},
"EnvVars": {
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/EnvVarsDef"
},
"uniqueItems": true
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"required": [ "Source", "Deploy" ],
"additionalProperties": false
},
"TomeeType": {
"properties": {
"Source": {
"enum": [ "tomee" ]
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"Lib": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"Deploy": {
"type": "string"
},
"EnvVars": {
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/EnvVarsDef"
},
"uniqueItems": true
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"required": [ "Source", "Deploy" ],
"additionalProperties": false
},
"NodeType": {
"properties": {
"Source": {
"enum": [ "node" ]
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"Start": {
"type": "string"
},
"ExposedPort": {
"type": "number"
},
"EnvVars": {
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/EnvVarsDef"
},
"uniqueItems": true
},
"Node": {
"$ref": "#/definitions/NodeType/definitions/NodeSubType"
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"required": [ "Source", "Start" ],
"additionalProperties": false,
"definitions": {
"NodeSubType": {
"properties": {
"Param": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"JavaType": {
"properties": {
"Source": {
"enum": [ "java" ]
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"Start": {
"type": "string"
},
"ExposedPort": {
"type": "number"
}
},
"required": [ "Source", "Start" ],
"additionalProperties": false
},
"RedisType": {
"properties": {
"Source": {
"enum": [ "redis" ]
}
},
"required": [ "Source" ],
"additionalProperties": false
},
"ShellType": {
"properties": {
"Source": {
"enum": [ "shell" ]
},
"Start": {
"type": "string"
},
"ExposedPort": {
"type": "number"
},
"DockerImage": {
"type": "string"
},
"DockerMemory": {
"type": "string"
},
"EnvVars": {
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/EnvVarsDef"
},
"uniqueItems": true
},
"BeforeStart": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
},
"AfterStart": {
"type": "array",
"minItems": 0,
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"patternProperties": {
"^[a-z]+.*$": {
"$ref": "#/definitions/ConfigFileDef"
}
},
"required": [ "Source", "Start" ],
"additionalProperties": false
},
"EnvVarsDef": {
"properties": {
"Name": {
"type": "string"
},
"Value": {
"type": "string"
}
},
"additionalProperties": false,
"required": [ "Name", "Value" ]
},
"ConfigFileDef": {
"properties": {
"Name": {
"type": "string"
},
"Content": {
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/ConfigFileDef/definitions/Content"
},
"uniqueItems": true
},
"LoadDefaultContent": {
"type": "string"
},
"AttachAsEnvVar": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string"
},
"uniqueItems": true
},
"AttachIntoDocker": {
"type": "string"
},
"AttachIntoDockerAsFile": {
"type": "string"
}
},
"additionalProperties": false,
"required": [ "Name" ],
"definitions": {
"Content": {
"properties": {
"Source": {
"type": "string"
},
"Regexp": {
"type": "string"
},
"Line": {
"type": "string"
}
},
"additionalProperties": false,
"required": [ "Line" ]
}
}
}
}
}