From 3cef94796ef61e6cd3633ba53349b9f44acbdc83 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 13 Nov 2023 21:55:28 +0000 Subject: [PATCH] update schemas to match pydantic 2.5.0 --- tests/samples/schemas/multiple.ibek.ioc.schema.json | 11 ++++++++++- tests/samples/schemas/objects.ibek.ioc.schema.json | 10 +++++++++- tests/samples/schemas/utils.ibek.ioc.schema.json | 9 ++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/samples/schemas/multiple.ibek.ioc.schema.json b/tests/samples/schemas/multiple.ibek.ioc.schema.json index 25f48fa0e..da1c4d461 100644 --- a/tests/samples/schemas/multiple.ibek.ioc.schema.json +++ b/tests/samples/schemas/multiple.ibek.ioc.schema.json @@ -238,7 +238,16 @@ "entities": { "description": "List of entities this IOC instantiates", "items": { - "anyOf": [ + "discriminator": { + "mapping": { + "module.AllObject": "#/$defs/module_AllObject", + "object_module.Consumer": "#/$defs/object_module_Consumer", + "object_module.ConsumerTwo": "#/$defs/object_module_ConsumerTwo", + "object_module.RefObject": "#/$defs/object_module_RefObject" + }, + "propertyName": "type" + }, + "oneOf": [ { "$ref": "#/$defs/object_module_RefObject" }, diff --git a/tests/samples/schemas/objects.ibek.ioc.schema.json b/tests/samples/schemas/objects.ibek.ioc.schema.json index bd5e8f802..d01197a9d 100644 --- a/tests/samples/schemas/objects.ibek.ioc.schema.json +++ b/tests/samples/schemas/objects.ibek.ioc.schema.json @@ -119,7 +119,15 @@ "entities": { "description": "List of entities this IOC instantiates", "items": { - "anyOf": [ + "discriminator": { + "mapping": { + "object_module.Consumer": "#/$defs/object_module_Consumer", + "object_module.ConsumerTwo": "#/$defs/object_module_ConsumerTwo", + "object_module.RefObject": "#/$defs/object_module_RefObject" + }, + "propertyName": "type" + }, + "oneOf": [ { "$ref": "#/$defs/object_module_RefObject" }, diff --git a/tests/samples/schemas/utils.ibek.ioc.schema.json b/tests/samples/schemas/utils.ibek.ioc.schema.json index a13b3d8c1..7839bf7e3 100644 --- a/tests/samples/schemas/utils.ibek.ioc.schema.json +++ b/tests/samples/schemas/utils.ibek.ioc.schema.json @@ -82,7 +82,14 @@ "entities": { "description": "List of entities this IOC instantiates", "items": { - "anyOf": [ + "discriminator": { + "mapping": { + "epics.InterruptVectorVME": "#/$defs/epics_InterruptVectorVME", + "epics.InterruptVectorVME2": "#/$defs/epics_InterruptVectorVME2" + }, + "propertyName": "type" + }, + "oneOf": [ { "$ref": "#/$defs/epics_InterruptVectorVME" },