I thought it might be helpful for you to have more examples of real-world schemas that expose corner cases for unit tests. I don't know if these expose issues with the generator or issues with the schema. In any case, here they are.
Unfortunately, from the CLI outputs, I was not able to deduce what the issues were.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"default": {
"type": "object",
"properties": {
"taskName": {
"type": "string"
},
"taskLabel": {
"type": "string"
},
"appliesTo": {
"type": "string"
},
"contextType": {
"type": "string",
"enum": [
"custom",
"build",
"clean",
"rebuild"
]
},
"output": {
"type": "string"
},
"inheritEnvironments": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"defaultTask": {
"allOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"default"
]
}
}
},
{
"$ref": "#/definitions/default"
}
]
},
"remote": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"remote"
]
},
"remoteMachineName": {
"type": "string"
},
"command": {
"type": "string"
},
"remoteWorkingDirectory": {
"type": "string"
},
"localCopyDirectory": {
"type": "string"
},
"remoteCopyDirectory": {
"type": "string"
},
"remoteCopyMethod": {
"type": "string",
"enum": [
"none",
"sftp",
"rsync"
]
},
"remoteCopySourcesOutputVerbosity": {
"type": "string",
"enum": [
"Normal",
"Verbose",
"Diagnostic"
]
},
"rsyncCommandArgs": {
"type": "string",
"default": "-t --delete"
},
"remoteCopyExclusionList": {
"type": "array"
}
}
},
"remoteTask": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/remote"
}
]
},
"launch": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"launch"
]
},
"command": {
"type": "string"
},
"args": {
"type": "array"
},
"launchOption": {
"type": "string",
"enum": [
"None",
"ContinueOnError",
"IgnoreError"
]
},
"workingDirectory": {
"type": "string"
},
"customLaunchCommand": {
"type": "string"
},
"customLaunchCommandArgs": {
"type": "string"
},
"envVars": {
"type": "object"
},
"commands": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"command": {
"type": "string"
},
"args": {
"type": "array"
},
"launchOption": {
"type": "string",
"enum": [
"None",
"ContinueOnError",
"IgnoreError"
]
},
"workingDirectory": {
"type": "string"
},
"customLaunchCommand": {
"type": "string"
},
"customLaunchCommandArgs": {
"type": "string"
},
"envVars": {
"type": "object"
}
}
}
]
}
}
},
"launchTask": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/launch"
}
]
},
"msbuild": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"msbuild"
]
},
"verbosity": {
"type": "string",
"enum": [
"Quiet",
"Minimal",
"Normal",
"Detailed",
"Diagnostic"
]
},
"toolsVersion": {
"type": "string"
},
"globalProperties": {
"type": "object"
},
"properties": {
"type": "object"
},
"targets": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"msbuildTask": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/msbuild"
}
]
}
},
"type": "object",
"properties": {
"version": {
"type": "string"
},
"variables": {
"type": "object"
},
"tasks": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/defaultTask"
},
{
"$ref": "#/definitions/remoteTask"
},
{
"$ref": "#/definitions/launchTask"
},
{
"$ref": "#/definitions/msbuildTask"
}
]
}
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"default": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"project": {
"type": "string"
},
"projectTarget": {
"type": "string"
},
"debugType": {
"type": "string",
"enum": [
"native",
"managed",
"mixed"
]
},
"inheritEnvironments": {
"type": "array",
"items": {
"type": "string"
}
},
"args": {
"type": "array"
},
"currentDir": {
"type": "string"
},
"noDebug": {
"type": "boolean"
},
"stopOnEntry": {
"type": "boolean"
},
"remoteMachine": {
"type": "string"
},
"buildConfigurations": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/default"
}
]
}
}
}
},
"defaultFile": {
"allOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"default"
]
}
}
},
{
"$ref": "#/definitions/default"
}
]
},
"dll": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"dll"
]
},
"exe": {
"type": "string"
}
}
},
"dllFile": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/dll"
}
]
},
"pyproj": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"pyproj"
]
}
}
},
"pyprojFile": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/pyproj"
}
]
},
"python": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"python"
]
},
"interpreter": {
"type": "string"
},
"interpreterArguments": {
"type": "string"
},
"scriptArguments": {
"type": "string"
},
"workingDirectory": {
"type": "string"
},
"nativeDebug": {
"type": "boolean"
},
"webBrowserUrl": {
"type": "string"
}
}
},
"pythonFile": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/python"
}
]
},
"cpp_schema": {
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "Full path to program executable."
},
"processId": {
"type": "integer",
"description": "Optional process id to attach the debugger to."
},
"sourceFileMap": {
"type": "object",
"description": "Optional source file mappings passed to the debug engine. Format: '{ \"<Compiler source location>\": \"<Editor source location>\" }' OR '{ \"<Compiler source location>\": { \"editorPath\": \"<Editor source location>\", \"useForBreakpoints\": true } }'. \nExample: '{ \"/home/user/foo\": \"C:\\foo\" }' OR '{ \"/home/user/foo\": { \"editorPath\": \"c:\\foo\", \"useForBreakpoints\": true } }'.",
"additionalProperties": {
"anyOf": {
"type": "string",
"$ref": "#/definitions/cpp_schema/definitions/sourceFileMapOptions"
}
}
},
"MIMode": {
"type": "string",
"description": "Indicates the type of MI-enabled console debugger that the MIDebugEngine will connect to. \nAllowed values are \"gdb\", \"lldb\"."
},
"args": {
"type": "array",
"description": "Command line arguments passed to the program.",
"items": {
"type": "string"
}
},
"environment": {
"type": "array",
"description": "Environment variables to add to the environment for the program. \nExample: [ { \"name\": \"squid\", \"value\": \"clam\" } ].",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"targetArchitecture": {
"type": "string",
"description": "The architecture of the debuggee. This will automatically be detected unless this parameter is set. \nAllowed values are x86, arm, arm64, mips, x64, amd64, x86_64."
},
"cwd": {
"type": "string",
"description": "The working directory of the target."
},
"miDebuggerPath": {
"type": "string",
"description": "The path to the MI-enabled debugger (such as gdb). When unspecified, it will search PATH first for the debugger."
},
"miDebuggerServerAddress": {
"type": "string",
"description": "Network address of the MI-enabled debugger server to connect to. \nExample: localhost:1234."
},
"setupCommands": {
"type": "array",
"description": "One or more GDB/LLDB commands to execute in order to setup the underlying debugger. \nExample: \"setupCommands\": [ { \"text\": \"-enable-pretty-printing\", \"description\": \"Enable GDB pretty printing\", \"ignoreFailures\": true }].",
"items": {
"$ref": "#/definitions/cpp_schema/definitions/launchSetupCommands"
}
},
"customLaunchSetupCommands": {
"type": "array",
"description": "If provided, this replaces the default commands used to launch a target with some other commands. \nFor example, this can be \"-target-attach\" in order to attach to a target process. \nAn empty command list replaces the launch commands with nothing, which can be useful if the debugger is being provided launch options as command line options. \nExample: \"customLaunchSetupCommands\": [ { \"text\": \"target-run\", \"description\": \"run target\", \"ignoreFailures\": false }].",
"items": {
"$ref": "#/definitions/cpp_schema/definitions/launchSetupCommands"
}
},
"launchCompleteCommand": {
"type": "string",
"enum": [
"exec-run",
"exec-continue",
"None"
],
"description": "The command to execute after the debugger is fully setup in order to cause the target process to run. \nAllowed values are \"exec-run\", \"exec-continue\", \"None\". \nThe default value is \"exec-run\"."
},
"debugServerPath": {
"type": "string",
"description": "Optional full path to debug server to launch. \nDefaults to null."
},
"debugServerArgs": {
"type": "string",
"description": "Optional debug server args. \nDefaults to null."
},
"serverStarted": {
"type": "string",
"description": "Optional server-started pattern to look for in the debug server output. \nDefaults to null."
},
"filterStdout": {
"type": "boolean",
"description": "Search stdout stream for server-started pattern and log stdout to debug output. \nDefaults to true."
},
"filterStderr": {
"type": "boolean",
"description": "Search stderr stream for server-started pattern and log stderr to debug output. \nDefaults to false."
},
"serverLaunchTimeout": {
"type": "integer",
"description": "Optional time, in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000."
},
"coreDumpPath": {
"type": "string",
"description": "Optional full path to a core dump file for the specified program. \nDefaults to null."
},
"externalConsole": {
"type": "boolean",
"description": "If true, a console is launched for the debuggee. If false, no console is launched. \nDefaults to false. NOTE: This option is ignored in some cases for technical reasons."
},
"pipeTransport": {
"$ref": "#/definitions/cpp_schema/definitions/pipeTransportOptions"
}
},
"definitions": {
"launchSetupCommands": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The debugger command to execute."
},
"description": {
"type": "string",
"description": "Optional description for the command."
},
"ignoreFailures": {
"type": "boolean",
"description": "If true, failures from the command should be ignored. \nDefaults to false."
}
}
},
"pipeTransportOptions": {
"type": "object",
"description": "When present, this tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between Visual Studio \nand the MI-enabled debugger (such as gdb).",
"properties": {
"pipeCwd": {
"type": "string",
"description": "The fully qualified path to the working directory for the pipe program."
},
"pipeProgram": {
"type": "string",
"description": "The fully qualified pipe command to execute."
},
"pipeArgs": {
"type": "array",
"description": "Command line arguments passed to the pipe program to configure the connection.",
"items": {
"type": "string"
}
},
"debuggerPath": {
"type": "string",
"description": "The full path to the debugger on the target machine, for example /usr/bin/gdb."
},
"pipeEnv": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Environment variables passed to the pipe program."
},
"quoteArgs": {
"type": "boolean",
"description": "If individual arguments contain characters (such as spaces or tabs), should it be quoted? If 'false', the debugger command will no longer be automatically quoted. \nDefault is 'true'."
}
}
},
"sourceFileMapOptions": {
"type": "object",
"properties": {
"editorPath": {
"type": "string",
"description": "The location of the source code for the editor to locate."
},
"useForBreakpoints": {
"type": "boolean",
"description": "When setting breakpoints, this source mapping should be used. \nIf 'false', only the filename and line number is used for setting breakpoints. \nIf 'true', breakpoints will be set with the full path to the file and line number only when this source mapping is used. Otherwise just filename and line number will be used when setting breakpoints. \nDefault is 'true'."
}
}
}
}
},
"cppTemplateLayout": {
"allOf": [
{
"$ref": "#/definitions/default"
},
{
"$ref": "#/definitions/cpp_schema"
}
]
},
"nativeLayout": {
"allOf": [
{
"$ref": "#/definitions/default"
}
]
},
"mixedLayout": {
"allOf": [
{
"$ref": "#/definitions/default"
}
]
},
"managedLayout": {
"allOf": [
{
"$ref": "#/definitions/default"
}
]
}
},
"type": "object",
"properties": {
"version": {
"type": "string"
},
"defaults": {
"properties": {
".dll": {
"$ref": "#/definitions/dll"
},
".pyproj": {
"$ref": "#/definitions/pyproj"
},
".py": {
"$ref": "#/definitions/python"
},
".pyw": {
"$ref": "#/definitions/python"
}
}
},
"configurations": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/defaultFile"
},
{
"$ref": "#/definitions/dllFile"
},
{
"$ref": "#/definitions/pyprojFile"
},
{
"$ref": "#/definitions/pythonFile"
},
{
"$ref": "#/definitions/cppTemplateLayout"
},
{
"$ref": "#/definitions/nativeLayout"
},
{
"$ref": "#/definitions/mixedLayout"
},
{
"$ref": "#/definitions/managedLayout"
}
]
}
}
}
}