From 091962bbbcc086c88aa0d06ffd9c323fc37c2e86 Mon Sep 17 00:00:00 2001 From: Enrico Eberhard Date: Mon, 8 Dec 2025 12:21:28 +0900 Subject: [PATCH 1/2] fix: modify urdf property to be oneOf string or object, else typescript generation fails --- .../draft/2-1-0/application.schema.json | 39 ++++++------------- .../applications/schema/hardware.schema.json | 39 ++++++------------- 2 files changed, 22 insertions(+), 56 deletions(-) diff --git a/docs/static/schemas/draft/2-1-0/application.schema.json b/docs/static/schemas/draft/2-1-0/application.schema.json index e6165282..1009c66f 100644 --- a/docs/static/schemas/draft/2-1-0/application.schema.json +++ b/docs/static/schemas/draft/2-1-0/application.schema.json @@ -696,13 +696,17 @@ "type": "object", "additionalProperties": false, "properties": { - "database_entry": { - "$ref": "#/$defs/database_entry" - }, "urdf": { - "title": "URDF", - "description": "The URDF describing the hardware", - "type": "string" + "oneOf": [ + { + "$ref": "#/$defs/database_entry" + }, + { + "title": "URDF", + "description": "The URDF describing the hardware", + "type": "string" + } + ] }, "rate": { "description": "The rate in Hz at which to run the hardware interface", @@ -887,29 +891,8 @@ } }, "required": [ + "urdf", "rate" - ], - "oneOf": [ - { - "required": [ - "database_entry" - ], - "not": { - "required": [ - "urdf" - ] - } - }, - { - "required": [ - "urdf" - ], - "not": { - "required": [ - "database_entry" - ] - } - } ] } } diff --git a/schemas/applications/schema/hardware.schema.json b/schemas/applications/schema/hardware.schema.json index b0a342ab..21b009a3 100644 --- a/schemas/applications/schema/hardware.schema.json +++ b/schemas/applications/schema/hardware.schema.json @@ -11,13 +11,17 @@ "type": "object", "additionalProperties": false, "properties": { - "database_entry": { - "$ref": "common/database_entry.schema.json" - }, "urdf": { - "title": "URDF", - "description": "The URDF describing the hardware", - "type": "string" + "oneOf": [ + { + "$ref": "common/database_entry.schema.json" + }, + { + "title": "URDF", + "description": "The URDF describing the hardware", + "type": "string" + } + ] }, "rate": { "description": "The rate in Hz at which to run the hardware interface", @@ -202,29 +206,8 @@ } }, "required": [ + "urdf", "rate" - ], - "oneOf": [ - { - "required": [ - "database_entry" - ], - "not": { - "required": [ - "urdf" - ] - } - }, - { - "required": [ - "urdf" - ], - "not": { - "required": [ - "database_entry" - ] - } - } ] } } From 10a4ba0b9043a2b07cd03984865fea217f70afc3 Mon Sep 17 00:00:00 2001 From: Enrico Eberhard Date: Thu, 18 Dec 2025 08:32:40 +0100 Subject: [PATCH 2/2] fix: update draft types schema (identical to full schema) --- .../draft/2-1-0/application.types.schema.json | 39 ++++++------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/docs/static/schemas/draft/2-1-0/application.types.schema.json b/docs/static/schemas/draft/2-1-0/application.types.schema.json index e6165282..1009c66f 100644 --- a/docs/static/schemas/draft/2-1-0/application.types.schema.json +++ b/docs/static/schemas/draft/2-1-0/application.types.schema.json @@ -696,13 +696,17 @@ "type": "object", "additionalProperties": false, "properties": { - "database_entry": { - "$ref": "#/$defs/database_entry" - }, "urdf": { - "title": "URDF", - "description": "The URDF describing the hardware", - "type": "string" + "oneOf": [ + { + "$ref": "#/$defs/database_entry" + }, + { + "title": "URDF", + "description": "The URDF describing the hardware", + "type": "string" + } + ] }, "rate": { "description": "The rate in Hz at which to run the hardware interface", @@ -887,29 +891,8 @@ } }, "required": [ + "urdf", "rate" - ], - "oneOf": [ - { - "required": [ - "database_entry" - ], - "not": { - "required": [ - "urdf" - ] - } - }, - { - "required": [ - "urdf" - ], - "not": { - "required": [ - "database_entry" - ] - } - } ] } }