Files
modulus/schemas/modulus.schema.json
T
khodowany 2750dd7f3a
publish / publish (push) Successful in 53m2s
Initial public khodo snapshot
2026-09-04 19:30:11 -05:00

312 lines
6.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.thyme-labs.com/khodo/modulus/schemas/modulus.schema.json",
"type": "object",
"required": [
"package"
],
"additionalProperties": false,
"properties": {
"package": {
"$ref": "#/$defs/package"
},
"boost": {
"$ref": "#/$defs/boost"
},
"tests": {
"$ref": "#/$defs/tests"
},
"tooling": {
"$ref": "#/$defs/tooling"
}
},
"$defs": {
"package_name": {
"type": "string",
"pattern": "^[a-z0-9_][a-z0-9_+.-]*$"
},
"conan_ref": {
"type": "string",
"pattern": "^[a-z0-9_][a-z0-9_+.-]*/[A-Za-z0-9_+.-]+(?:@[A-Za-z0-9_+.-]+/[A-Za-z0-9_+.-]+)?$"
},
"cmake_name": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_+.-]*$"
},
"relative_path": {
"type": "string",
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))[A-Za-z0-9_./+*?\\[\\]-]+$"
},
"option_value": {
"type": [
"boolean",
"integer",
"string"
]
},
"options": {
"type": "object",
"propertyNames": {
"pattern": "^[A-Za-z0-9_+./*:-]+$"
},
"additionalProperties": {
"$ref": "#/$defs/option_value"
}
},
"package": {
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/$defs/package_name"
},
"artifact": {
"$ref": "#/$defs/artifact"
}
}
},
"artifact": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"targets": {
"type": "array",
"items": {
"$ref": "#/$defs/cmake_name"
}
},
"install_prefix": {
"type": "string",
"pattern": "^(|(?!(?:/|.*(?:^|/)\\.\\.(?:/|$)))[A-Za-z0-9_./+*?\\[\\]-]+)$"
},
"cmake_definitions": {
"$ref": "#/$defs/options"
},
"conan_options": {
"$ref": "#/$defs/options"
},
"registry_url": {
"type": "string"
},
"upload_env": {
"type": "string",
"pattern": "^[A-Z_][A-Z0-9_]*$"
}
}
},
"boost": {
"type": "object",
"additionalProperties": false,
"properties": {
"ref": {
"$ref": "#/$defs/conan_ref"
},
"components": {
"type": "array",
"items": {
"$ref": "#/$defs/cmake_name"
}
},
"default_options": {
"$ref": "#/$defs/options"
}
}
},
"tests": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"name": {
"$ref": "#/$defs/cmake_name"
}
}
},
"tooling": {
"type": "object",
"additionalProperties": false,
"properties": {
"default_target": {
"$ref": "#/$defs/cmake_name"
},
"upload_env": {
"type": "string",
"pattern": "^[A-Z_][A-Z0-9_]*$"
},
"docker": {
"type": "object",
"additionalProperties": false,
"properties": {
"image": {
"type": "string"
},
"marker": {
"type": "string",
"pattern": "^/"
}
}
},
"remote": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"run": {
"$ref": "#/$defs/run"
},
"lsp": {
"$ref": "#/$defs/lsp"
},
"targets": {
"type": "object",
"propertyNames": {
"$ref": "#/$defs/cmake_name"
},
"additionalProperties": {
"$ref": "#/$defs/target"
}
}
}
},
"lsp": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"compile_databases": {
"type": "array",
"items": {
"$ref": "#/$defs/lsp_compile_database"
}
}
}
},
"lsp_compile_database": {
"type": "object",
"required": [
"name",
"build_dir"
],
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/$defs/cmake_name"
},
"source_dir": {
"$ref": "#/$defs/relative_path"
},
"build_dir": {
"$ref": "#/$defs/relative_path"
},
"generator": {
"type": "string"
},
"cmake_definitions": {
"$ref": "#/$defs/options"
},
"env": {
"type": "object",
"propertyNames": {
"pattern": "^[A-Z_][A-Z0-9_]*$"
},
"additionalProperties": {
"type": "string"
}
},
"unset_env": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z_][A-Z0-9_]*$"
}
}
}
},
"run": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"target": {
"$ref": "#/$defs/cmake_name"
},
"executable": {
"$ref": "#/$defs/relative_path"
},
"env": {
"type": "object",
"propertyNames": {
"pattern": "^[A-Z_][A-Z0-9_]*$"
},
"additionalProperties": {
"type": "string"
}
},
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"ports": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]+(?:/(?:tcp|udp|sctp))?$"
}
}
}
},
"target": {
"type": "object",
"required": [
"profile",
"build_dir"
],
"additionalProperties": false,
"properties": {
"profile": {
"$ref": "#/$defs/relative_path"
},
"build_dir": {
"$ref": "#/$defs/relative_path"
},
"can_run": {
"type": "boolean"
},
"build_type": {
"type": "string",
"enum": [
"Debug",
"Release",
"RelWithDebInfo",
"MinSizeRel"
]
},
"cmake_definitions": {
"$ref": "#/$defs/options"
}
}
}
}
}