Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add json-schema #1357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions Assets/json-schema/breakpoint_action.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "XcodeGen Breakpoint Action Object",
"description": "XcodeGen Breakpoint Action Object.\n https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#breakpoint-action",
"type": "object",
"properties": {
"type": {
"description": "Breakpoint action type",
"type": "string",
"enum": [
"DebuggerCommand",
"Log",
"ShellCommand",
"GraphicsTrace",
"AppleScript",
"Sound"
],
"examples": [
"DebuggerCommand",
"Log",
"ShellCommand",
"GraphicsTrace",
"AppleScript",
"Sound"
]
},
"command": {
"description": "Debugger command (only used by debugger command breakpoint action)",
"type": "string"
},
"message": {
"description": "Log message (only used log message breakpoint action)",
"type": "string"
},
"conveyanceType": {
"description": "Conveyance type (only used by log message breakpoint action)",
"type": "string",
"enum": ["console", "speak"],
"examples": ["console", "speak"]
},
"path": {
"description": "Shell command file path (only used by shell command breakpoint action)",
"type": "string"
},
"arguments": {
"description": "Shell command arguments (only used by shell command breakpoint action)",
"type": "string"
},
"waitUntilDone": {
"description": "Indicates whether it should wait until done (only used by shell command breakpoint action). Default to false",
"default": false,
"type": "boolean"
},
"script": {
"description": "AppleScript (only used by AppleScript breakpoint action)",
"type": "string"
},
"sound": {
"description": "Sound name (only used by sound breakpoint action)",
"type": "string",
"default": "Basso",
"enum": [
"Basso",
"Blow",
"Bottle",
"Frog",
"Funk",
"Glass",
"Hero",
"Morse",
"Ping",
"Pop",
"Purr",
"Sosumi",
"Submarine",
"Tink"
],
"examples": [
"Basso",
"Blow",
"Bottle",
"Frog",
"Funk",
"Glass",
"Hero",
"Morse",
"Ping",
"Pop",
"Purr",
"Sosumi",
"Submarine",
"Tink"
]
},
"module": {
"description": "Breakpoint module (only used by symbolic breakpoints)",
"type": "string"
},
"scope": {
"description": "Breakpoint scope (only used by exception breakpoints)",
"type": "string",
"default": "Objective-C",
"enum": ["All", "Objective-C", "C++"]
},
"stopOnStyle": {
"description": "Indicates if should stop on style (only used by exception breakpoints) -throw (default) -catch",
"type": "string"
},
"condition": {
"description": "Breakpoint condition",
"type": "string"
},
"actions": {
"description": "breakpoint actions",
"type": "array",
"items": {
"type": "object",
"$ref": "breakpoint_action.json"
}
}
},
"required": ["type"]
}
98 changes: 98 additions & 0 deletions Assets/json-schema/breakpoints.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "XcodeGen Breakpoints Object",
"description": "XcodeGen Breakpoints Object.\n https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#breakpoints",
"type": "object",
"properties": {
"type": {
"description": "Breakpoint type",
"type": "string",
"enum": [
"File",
"Exception",
"SwiftError",
"OpenGLError",
"Symbolic",
"IDEConstraintError",
"IDETestFailure",
"FileBreakpoint",
"ExceptionBreakpoint",
"SwiftErrorBreakpoint",
"OpenGLErrorBreakpoint",
"SymbolicBreakpoint",
"IDEConstraintErrorBreakpoint",
"IDETestFailureBreakpoint"
],
"examples": [
"File",
"Exception",
"SwiftError",
"OpenGLError",
"Symbolic",
"IDEConstraintError",
"IDETestFailure",
"FileBreakpoint",
"ExceptionBreakpoint",
"SwiftErrorBreakpoint",
"OpenGLErrorBreakpoint",
"SymbolicBreakpoint",
"IDEConstraintErrorBreakpoint",
"IDETestFailureBreakpoint"
]
},
"enabled": {
"description": "Indicates whether it should be active. Default to true",
"default": true,
"type": "boolean"
},
"ignoreCount": {
"description": "Indicates how many times it should be ignored before stopping, Default to 0",
"type": "integer",
"default": 0
},
"continueAfterRunningActions": {
"description": "Indicates if should automatically continue after evaluating actions, Default to false",
"default": false,
"type": "boolean"
},
"path": {
"description": "Breakpoint file path (only required by file breakpoints)",
"type": "string"
},
"line": {
"description": "Breakpoint line (only required by file breakpoints)",
"type": "integer"
},
"symbol": {
"description": "Breakpoint symbol (only used by symbolic breakpoints)",
"type": "string"
},
"module": {
"description": "Breakpoint module (only used by symbolic breakpoints)",
"type": "string"
},
"scope": {
"description": "Breakpoint scope (only used by exception breakpoints)",
"type": "string",
"default": "Objective-C",
"enum": ["All", "Objective-C", "C++"]
},
"stopOnStyle": {
"description": "Indicates if should stop on style (only used by exception breakpoints) -throw (default) -catch",
"type": "string"
},
"condition": {
"description": "Breakpoint condition",
"type": "string"
},
"actions": {
"description": "breakpoint actions",
"type": "array",
"items": {
"type": "object",
"$ref": "breakpoint_action.json"
}
}
},
"required": ["type"]
}
74 changes: 74 additions & 0 deletions Assets/json-schema/build_script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "XcodeGen Build Script Object",
"description": "https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#build-script",
"type": "object",
"properties": {
"script": {
"description": "an inline shell script",
"type": "string"
},
"name": {
"description": "name of a script. Defaults to Run Script",
"default": "Run Script",
"type": "string"
},
"inputFiles": {
"description": "list of input files",
"type": "array",
"items": {
"type": "string",
"examples": ["${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"]
}
},
"outputFiles": {
"description": "list of output files",
"type": "array",
"items": {
"type": "string",
"examples": ["${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"]
}
},
"inputFileLists": {
"description": "list of input .xcfilelist",
"type": "array",
"items": {
"type": "string",
"examples": ["${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"]
}
},
"outputFileLists": {
"description": "list of output .xcfilelist",
"type": "array",
"items": {
"type": "string",
"examples": ["${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"]
}
},
"shell": {
"description": "shell used for the script. Defaults to /bin/sh",
"type": "string",
"default": "/bin/sh"
},
"showEnvVars": {
"description": "whether the environment variables accessible to the script show be printed to the build log. Defaults to true",
"type": "boolean",
"default": "true"
},
"runOnlyWhenInstalling": {
"description": "whether the script is only run when installing (runOnlyForDeploymentPostprocessing). Defaults to false",
"type": "boolean",
"default": "false"
},
"basedOnDependencyAnalysis": {
"description": "whether to skip the script if inputs, context, or outputs haven't changed. Defaults to true",
"type": "boolean",
"default": "true"
},
"discoveredDependencyFile": {
"description": " discovered dependency .d file. Defaults to none",
"type": "string",
"default": "none"
}
}
}
7 changes: 7 additions & 0 deletions Assets/json-schema/config_files.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "XcodeGen Config Files Object",
"description": "XcodeGen Config Files Object.\n https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#config-files",
"type": "object",
"minProperties": 1
}
10 changes: 10 additions & 0 deletions Assets/json-schema/configs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "XcodeGen Configs Object",
"description": "XcodeGen Configs Object.\n https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#configs",
"type": "object",
"additionalProperties": {
"examples": ["debug", "release"]
},
"minProperties": 1
}
Loading