From 6daf230a0f1dc910cd2bc2b8cd8d2c3ab49067c2 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Mon, 23 Sep 2024 18:15:04 +0000 Subject: [PATCH] correcting discovery & schema - re: satisfactory-dev/Docs.json.ts#2 --- lib/TypeDefinitionDiscovery.ts | 30 ++++++++++++++++++++++++++++++ schema/1.0.schema.json | 6 ++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/lib/TypeDefinitionDiscovery.ts b/lib/TypeDefinitionDiscovery.ts index 21d436d9..7babaf8e 100644 --- a/lib/TypeDefinitionDiscovery.ts +++ b/lib/TypeDefinitionDiscovery.ts @@ -555,6 +555,36 @@ export class TypeDefinitionDiscovery }, }, }, + { + type: 'object', + required: [ + 'type', + 'prefixItems', + 'minItems', + ], + additionalProperties: false, + properties: { + type: { + type: 'string', + const: 'array', + }, + minItems: { + type: 'number', + minimum: 1, + }, + maxItems: { + type: 'number', + minimum: 1, + }, + prefixItems: { + type: 'array', + minItems: 1, + items: { + $ref: '#/$defs/$ref', + }, + }, + }, + }, ]}}, }, }, diff --git a/schema/1.0.schema.json b/schema/1.0.schema.json index 268f0347..69192d35 100644 --- a/schema/1.0.schema.json +++ b/schema/1.0.schema.json @@ -11157,7 +11157,7 @@ }, "FGPowerShardDescriptor": { "type": "object", - "$ref": "#/$defs/FGItemDescriptor--FGBuildingDescriptor--FGResourceDescriptor", + "$ref": "#/$defs/FGItemDescriptor--FGResourceDescriptor", "required": [ "mPowerShardType", "mExtraPotential", @@ -12131,7 +12131,9 @@ "minItems": 2, "maxItems": 2, "items": { - "$ref": "#/$defs/FGPowerShardDescriptor" + "type": "object", + "$ref": "#/$defs/FGPowerShardDescriptor", + "unevaluatedProperties": false } } }