Make configuration and compatibility contracts executable

This commit is contained in:
2026-11-12 08:27:53 +01:00
parent 306266ae40
commit 85a75383a0
28 changed files with 2284 additions and 8 deletions
@@ -0,0 +1,210 @@
{
"type": "object",
"properties": {
"schemaVersion": {
"const": "1.0"
},
"contexts": {
"type": "object",
"minProperties": 1,
"maxProperties": 128,
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
"maxLength": 128
},
"additionalProperties": {
"type": "object",
"properties": {
"applicationModule": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"mavenProfiles": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"uniqueItems": true,
"maxItems": 128
},
"launchMode": {
"enum": [
"classpath",
"module-path"
]
},
"buildRuntime": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
"maxLength": 128
},
"targetRuntime": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
"maxLength": 128
},
"buildJava": {
"type": "integer",
"minimum": 21,
"maximum": 99
},
"targetJava": {
"type": "integer",
"minimum": 21,
"maximum": 99
},
"requiredCapabilities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"uniqueItems": true,
"maxItems": 128
},
"preview": {
"type": "object",
"properties": {
"sourceSet": {
"enum": [
"module",
"test"
]
},
"module": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"provider": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"defaultExample": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"examples": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"uniqueItems": true,
"maxItems": 128
}
},
"required": [
"sourceSet",
"provider"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"sourceSet": {
"const": "module"
}
}
},
"then": {
"required": [
"module"
]
},
"else": {
"not": {
"required": [
"module"
]
}
}
}
]
},
"modulePath": {
"type": "object",
"properties": {
"entryModule": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
"maxLength": 128
},
"addReads": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"uniqueItems": true,
"maxItems": 128
},
"addOpens": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"uniqueItems": true,
"maxItems": 128
}
},
"required": [
"entryModule"
],
"additionalProperties": false
}
},
"required": [
"applicationModule",
"launchMode",
"buildRuntime",
"targetRuntime",
"preview"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"launchMode": {
"const": "module-path"
}
}
},
"then": {
"required": [
"modulePath"
]
},
"else": {
"not": {
"required": [
"modulePath"
]
}
}
}
]
}
}
},
"required": [
"schemaVersion",
"contexts"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:neitzelfxdesigner:configuration:1.0"
}
@@ -0,0 +1,50 @@
{
"type": "object",
"properties": {
"schemaVersion": {
"const": "1.0"
},
"runtimes": {
"type": "object",
"maxProperties": 128,
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
"maxLength": 128
},
"additionalProperties": {
"type": "object",
"properties": {
"build": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"target": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [],
"additionalProperties": false
}
},
"rememberedContexts": {
"type": "object",
"additionalProperties": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
"maxLength": 128
},
"maxProperties": 1024
}
},
"required": [
"schemaVersion",
"runtimes"
],
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:neitzelfxdesigner:local-settings:1.0"
}