Permalink
Switch branches/tags
Nothing to show
Find file Copy path
54812f7 Oct 27, 2018
1 contributor

Users who have contributed to this file

165 lines (162 sloc) 4.3 KB
{
"title": "kaitaiStructCompile setuptools config",
"description": "A config for kaitaiStructCompile setuptools plugin",
"type": "object",
"definitions" : {
"compilerFlags":{
"title": "kaitaiStructCompile compile **kwargs",
"description": "A schema for kwargs of `compile` function",
"properties" : {
"readStoresPos":{
"description": "Enable saving info about offsets",
"type" : "boolean",
"default": false
},
"autoRead":{
"description": "automatically calling `_read`",
"type" : "boolean",
"default": true
},
"opaqueTypes":{
"description": "Allow referring undefined types assumming that they are defined and follow the protocol",
"type" : "boolean",
"default": false
},
"namespaces":{
"$ref" : "#/definitions/namespacesSpec"
},
"additionalFlags" : {
"description": "new flags having no special support in the library are here",
"$ref" : "#/definitions/additionalFlags"
}
},
"additionalProperties" : false
},
"additionalFlags": {
"description": "Additional flags to pass to the compiler",
"type": "array",
"default": [],
"items":{
"type": "string"
}
},
"namespacesSpec" : {
"type" : "object",
"description": "Allows to rename packages. For python you usually need `.`.",
"properties" : {
"python" : {"type" : "string", "default": "."},
"go" : {"type" : "string", "default": null},
"jre" : {"type" : "string", "default": null},
"dotNet" : {"type" : "string", "default": null},
"php" : {"type" : "string", "default": null},
"c++" : {"type" : "string", "default": null}
},
"default": {"python":"."},
"additionalProperties" : false
},
"compilationTargetSpec" : {
"type" : "object",
"description": "A descriptor of a KSY file to be processed",
"properties" : {
"path" : {
"description": "A path to a KSY file",
"format" : "path"
},
"flags" : {
"$ref" : "#/definitions/compilerFlags"
},
"postprocess" : {
"type": "array",
"default": [],
"description": "The names of postprocessing functions to use against this file",
"items":{
"type": "string"
}
}
},
"required" : ["path"],
"additionalProperties" : false
},
"formatsDict" : {
"type" : "object",
"description": "A dictionary of ksy files to be converted into python files",
"additionalProperties" : {
"$ref" : "#/definitions/compilationTargetSpec"
}
},
"formatsRepo" : {
"description": "Describes a repo of formats.",
"type" : "object",
"properties" : {
"git" : {
"description": "A path to formats directory git repo to clone it",
"format" : "URI",
"default": "https://github.com/kaitai-io/kaitai_struct_formats.git"
},
"refspec" : {
"description": "git refspec (a branch, tag, commit, etc)",
"type" : "string",
"default": ""
},
"localPath" : {
"format" : "path",
"description": "A local path to formats directory dir",
"default": null
},
"update" : {
"type" : "boolean",
"description": "Download the latest version of the directory by path specified with `git` param",
"default": false
}
},
"additionalProperties" : false
},
"postprocessersDict":{
"description": "A dict of functions and their names to ref them by names.",
"type" : "object",
"additionalProperties" : {
"format" : "function"
},
"default": {}
}
},
"required" : ["formats"],
"properties" : {
"formats" : {
"$ref" : "#/definitions/formatsDict"
},
"repo" : {
"$ref" : "#/definitions/formatsRepo"
},
"postprocessers" : {
"$ref" : "#/definitions/postprocessersDict"
},
"kaitaiStructRoot" : {
"description": "A path to Kaitai Struct root directory",
"format" : "path",
"default": null
},
"formatsRepo" : {
"$ref" : "#/definitions/formatsRepo"
},
"outputDir" : {
"description": "A path to a dir to output results",
"format" : "path",
"default": null
},
"inputDir" : {
"description": "A path to a dir with ksy files",
"format" : "path",
"default": null
},
"search":{
"description": "Whether input dir should be searched for `*.ksy`s",
"type" : "boolean",
"default": false
},
"flags":{
"$ref" : "#/definitions/compilerFlags"
}
},
"additionalProperties" : false
}