diff --git a/rpc/schemas/common/data/input/elements/InputElement.json b/rpc/schemas/common/data/input/elements/InputElement.json index c8523d308..653808bcd 100644 --- a/rpc/schemas/common/data/input/elements/InputElement.json +++ b/rpc/schemas/common/data/input/elements/InputElement.json @@ -2,8 +2,8 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "oneOf": [ - { "$ref": "#/$defs/SelectOne" }, - { "$ref": "#/$defs/Text" } + { "$ref": "#SelectOne" }, + { "$ref": "#Text" } ], "$defs": { "SelectOne": { diff --git a/rpc/schemas/common/devices/DeviceConfiguration.json b/rpc/schemas/common/devices/DeviceConfiguration.json index b8adaeac8..8a62ad3f0 100644 --- a/rpc/schemas/common/devices/DeviceConfiguration.json +++ b/rpc/schemas/common/devices/DeviceConfiguration.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ - { "$ref": "#/$defs/DeviceConfiguration" }, + { "$ref": "#DeviceConfiguration" }, { "if": { "properties": { "__type": { "const": "dk.cachet.carp.common.application.devices.AltBeacon" } } }, "then": { "$ref": "AltBeacon.json" } diff --git a/rpc/schemas/common/devices/DeviceRegistration.json b/rpc/schemas/common/devices/DeviceRegistration.json index e66b2e763..3dceeb127 100644 --- a/rpc/schemas/common/devices/DeviceRegistration.json +++ b/rpc/schemas/common/devices/DeviceRegistration.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ - { "$ref": "#/$defs/DeviceRegistration" }, + { "$ref": "#DeviceRegistration" }, { "if": { "properties": { "__type": { "const": "dk.cachet.carp.common.application.devices.AltBeaconDeviceRegistration" } } }, "then": { "$ref": "AltBeacon.json#DeviceRegistration" } diff --git a/rpc/schemas/common/devices/PrimaryDeviceConfiguration.json b/rpc/schemas/common/devices/PrimaryDeviceConfiguration.json index ef4de9950..6d7bf76d9 100644 --- a/rpc/schemas/common/devices/PrimaryDeviceConfiguration.json +++ b/rpc/schemas/common/devices/PrimaryDeviceConfiguration.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ - { "$ref": "#/$defs/PrimaryDeviceConfiguration" }, + { "$ref": "#PrimaryDeviceConfiguration" }, { "if": { "properties": { "__type": { "const": "dk.cachet.carp.common.application.devices.Smartphone" } } }, "then": { "$ref": "Smartphone.json" } diff --git a/rpc/schemas/common/sampling/SamplingConfiguration.json b/rpc/schemas/common/sampling/SamplingConfiguration.json index 428d29e43..5f81a3a4d 100644 --- a/rpc/schemas/common/sampling/SamplingConfiguration.json +++ b/rpc/schemas/common/sampling/SamplingConfiguration.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ - { "$ref": "#/$defs/SamplingConfiguration" }, + { "$ref": "#SamplingConfiguration" }, { "if": { "properties": { "__type": { "const": "dk.cachet.carp.common.application.sampling.BatteryAwareSamplingConfiguration" } } }, "then": { "$ref": "BatteryAwareSamplingConfiguration.json" } diff --git a/rpc/schemas/common/tasks/Measure.json b/rpc/schemas/common/tasks/Measure.json index 4f8f52530..e52a944ca 100644 --- a/rpc/schemas/common/tasks/Measure.json +++ b/rpc/schemas/common/tasks/Measure.json @@ -2,8 +2,8 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "oneOf": [ - { "$ref": "#/$defs/DataStream" }, - { "$ref": "#/$defs/TriggerData" } + { "$ref": "#DataStream" }, + { "$ref": "#TriggerData" } ], "$defs": { "DataStream": { diff --git a/rpc/schemas/common/tasks/TaskConfiguration.json b/rpc/schemas/common/tasks/TaskConfiguration.json index d8a415c7f..944345d8f 100644 --- a/rpc/schemas/common/tasks/TaskConfiguration.json +++ b/rpc/schemas/common/tasks/TaskConfiguration.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ - { "$ref": "#/$defs/TaskConfiguration" }, + { "$ref": "#TaskConfiguration" }, { "if": { "properties": { "__type": { "const": "dk.cachet.carp.common.application.tasks.BackgroundTask" } } }, "then": { "$ref": "BackgroundTask.json" } diff --git a/rpc/schemas/common/triggers/TaskControl.json b/rpc/schemas/common/triggers/TaskControl.json index 224acb172..ddfd0a98a 100644 --- a/rpc/schemas/common/triggers/TaskControl.json +++ b/rpc/schemas/common/triggers/TaskControl.json @@ -5,7 +5,7 @@ "triggerId": { "type": "integer" }, "taskName": { "type": "string" }, "destinationDeviceRoleName": { "type": "string" }, - "control": { "$ref": "#/$defs/Control" } + "control": { "$ref": "#Control" } }, "required": [ "triggerId", "taskName", "destinationDeviceRoleName", "control" ], "additionalProperties": false, diff --git a/rpc/schemas/common/triggers/TriggerConfiguration.json b/rpc/schemas/common/triggers/TriggerConfiguration.json index 351534d74..10ad31673 100644 --- a/rpc/schemas/common/triggers/TriggerConfiguration.json +++ b/rpc/schemas/common/triggers/TriggerConfiguration.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ - { "$ref": "#/$defs/TriggerConfiguration" }, + { "$ref": "#TriggerConfiguration" }, { "if": { "properties": { "__type": { "const": "dk.cachet.carp.common.application.triggers.ElapsedTimeTrigger" } } }, "then": { "$ref": "ElapsedTimeTrigger.json" } diff --git a/rpc/schemas/common/users/AccountIdentity.json b/rpc/schemas/common/users/AccountIdentity.json index 1b21eaafd..eae13056e 100644 --- a/rpc/schemas/common/users/AccountIdentity.json +++ b/rpc/schemas/common/users/AccountIdentity.json @@ -2,8 +2,8 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "oneOf": [ - { "$ref": "#/$defs/EmailAccountIdentity" }, - { "$ref": "#/$defs/UsernameAccountIdentity" } + { "$ref": "#EmailAccountIdentity" }, + { "$ref": "#UsernameAccountIdentity" } ], "$defs": { "EmailAccountIdentity": { diff --git a/rpc/schemas/common/users/AssignedTo.json b/rpc/schemas/common/users/AssignedTo.json index 461a96e11..ab72fb3fe 100644 --- a/rpc/schemas/common/users/AssignedTo.json +++ b/rpc/schemas/common/users/AssignedTo.json @@ -2,8 +2,8 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "oneOf": [ - { "$ref": "#/$defs/All" }, - { "$ref": "#/$defs/Roles" } + { "$ref": "#All" }, + { "$ref": "#Roles" } ], "$defs": { "All": { diff --git a/rpc/schemas/common/users/ParticipantAttribute.json b/rpc/schemas/common/users/ParticipantAttribute.json index 35f462838..ae8db0737 100644 --- a/rpc/schemas/common/users/ParticipantAttribute.json +++ b/rpc/schemas/common/users/ParticipantAttribute.json @@ -2,8 +2,8 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "oneOf": [ - { "$ref": "#/$defs/DefaultParticipantAttribute" }, - { "$ref": "#/$defs/CustomParticipantAttribute" } + { "$ref": "#DefaultParticipantAttribute" }, + { "$ref": "#CustomParticipantAttribute" } ], "$defs": { "DefaultParticipantAttribute": { diff --git a/rpc/schemas/data/DataStreamService/DataStreamServiceRequest.json b/rpc/schemas/data/DataStreamService/DataStreamServiceRequest.json index 89c73c582..3c7fbecc3 100644 --- a/rpc/schemas/data/DataStreamService/DataStreamServiceRequest.json +++ b/rpc/schemas/data/DataStreamService/DataStreamServiceRequest.json @@ -1,11 +1,11 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/OpenDataStreams" }, - { "$ref": "#/$defs/AppendToDataStreams" }, - { "$ref": "#/$defs/GetDataStream" }, - { "$ref": "#/$defs/CloseDataStreams" }, - { "$ref": "#/$defs/RemoveDataStreams" } + { "$ref": "#OpenDataStreams" }, + { "$ref": "#AppendToDataStreams" }, + { "$ref": "#GetDataStream" }, + { "$ref": "#CloseDataStreams" }, + { "$ref": "#RemoveDataStreams" } ], "$defs": { "ApiVersion": { "const": "1.1" }, @@ -76,6 +76,7 @@ } }, "RemoveDataStreams": { + "$anchor": "RemoveDataStreams", "type": "object", "properties": { "__type": { "const": "dk.cachet.carp.data.infrastructure.DataStreamServiceRequest.RemoveDataStreams" }, diff --git a/rpc/schemas/deployments/DeploymentService/DeploymentServiceRequest.json b/rpc/schemas/deployments/DeploymentService/DeploymentServiceRequest.json index 484e50507..6a3a2ca2a 100644 --- a/rpc/schemas/deployments/DeploymentService/DeploymentServiceRequest.json +++ b/rpc/schemas/deployments/DeploymentService/DeploymentServiceRequest.json @@ -1,15 +1,15 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/CreateStudyDeployment" }, - { "$ref": "#/$defs/RemoveStudyDeployments" }, - { "$ref": "#/$defs/GetStudyDeploymentStatus" }, - { "$ref": "#/$defs/GetStudyDeploymentStatusList" }, - { "$ref": "#/$defs/RegisterDevice" }, - { "$ref": "#/$defs/UnregisterDevice" }, - { "$ref": "#/$defs/GetDeviceDeploymentFor" }, - { "$ref": "#/$defs/DeviceDeployed" }, - { "$ref": "#/$defs/Stop" } + { "$ref": "#CreateStudyDeployment" }, + { "$ref": "#RemoveStudyDeployments" }, + { "$ref": "#GetStudyDeploymentStatus" }, + { "$ref": "#GetStudyDeploymentStatusList" }, + { "$ref": "#RegisterDevice" }, + { "$ref": "#UnregisterDevice" }, + { "$ref": "#GetDeviceDeploymentFor" }, + { "$ref": "#DeviceDeployed" }, + { "$ref": "#Stop" } ], "$defs": { "ApiVersion": { "const": "1.3" }, diff --git a/rpc/schemas/deployments/DeviceDeploymentStatus.json b/rpc/schemas/deployments/DeviceDeploymentStatus.json index 9b352ab3e..3a1f40ec9 100644 --- a/rpc/schemas/deployments/DeviceDeploymentStatus.json +++ b/rpc/schemas/deployments/DeviceDeploymentStatus.json @@ -1,10 +1,10 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/Unregistered" }, - { "$ref": "#/$defs/Registered" }, - { "$ref": "#/$defs/Deployed" }, - { "$ref": "#/$defs/NeedsRedeployment" } + { "$ref": "#Unregistered" }, + { "$ref": "#Registered" }, + { "$ref": "#Deployed" }, + { "$ref": "#NeedsRedeployment" } ], "$defs": { "DeviceDeploymentStatus": { @@ -16,6 +16,7 @@ "required": [ "__type", "device" ] }, "NotDeployed": { + "$anchor": "NotDeployed", "type": "object", "properties": { "remainingDevicesToRegisterToObtainDeployment": { @@ -33,7 +34,7 @@ "$anchor": "Unregistered", "allOf": [ { "$ref": "#/$defs/DeviceDeploymentStatus" }, - { "$ref": "#/$defs/NotDeployed" } + { "$ref": "#NotDeployed" } ], "properties": { "__type": { "const": "dk.cachet.carp.deployments.application.DeviceDeploymentStatus.Unregistered" }, @@ -46,7 +47,7 @@ "$anchor": "Registered", "allOf": [ { "$ref": "#/$defs/DeviceDeploymentStatus" }, - { "$ref": "#/$defs/NotDeployed" } + { "$ref": "#NotDeployed" } ], "properties": { "__type": { "const": "dk.cachet.carp.deployments.application.DeviceDeploymentStatus.Registered" }, @@ -69,7 +70,7 @@ "$anchor": "NeedsRedeployment", "allOf": [ { "$ref": "#/$defs/DeviceDeploymentStatus" }, - { "$ref": "#/$defs/NotDeployed" } + { "$ref": "#NotDeployed" } ], "properties": { "__type": { "const": "dk.cachet.carp.deployments.application.DeviceDeploymentStatus.NeedsRedeployment" } diff --git a/rpc/schemas/deployments/ParticipationService/ParticipationServiceRequest.json b/rpc/schemas/deployments/ParticipationService/ParticipationServiceRequest.json index ab09b4bdd..6afc93400 100644 --- a/rpc/schemas/deployments/ParticipationService/ParticipationServiceRequest.json +++ b/rpc/schemas/deployments/ParticipationService/ParticipationServiceRequest.json @@ -1,10 +1,10 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/GetActiveParticipationInvitations" }, - { "$ref": "#/$defs/GetParticipantData" }, - { "$ref": "#/$defs/GetParticipantDataList" }, - { "$ref": "#/$defs/SetParticipantData" } + { "$ref": "#GetActiveParticipationInvitations" }, + { "$ref": "#GetParticipantData" }, + { "$ref": "#GetParticipantDataList" }, + { "$ref": "#SetParticipantData" } ], "$defs": { "ApiVersion": { "const": "1.0" }, diff --git a/rpc/schemas/deployments/StudyDeploymentStatus.json b/rpc/schemas/deployments/StudyDeploymentStatus.json index 20c76df8f..df0f002da 100644 --- a/rpc/schemas/deployments/StudyDeploymentStatus.json +++ b/rpc/schemas/deployments/StudyDeploymentStatus.json @@ -1,10 +1,10 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/Invited" }, - { "$ref": "#/$defs/DeployingDevices" }, - { "$ref": "#/$defs/Running" }, - { "$ref": "#/$defs/Stopped" } + { "$ref": "#Invited" }, + { "$ref": "#DeployingDevices" }, + { "$ref": "#Running" }, + { "$ref": "#Stopped" } ], "$defs": { "StudyDeploymentStatus": { diff --git a/rpc/schemas/deployments/users/ParticipantData.json b/rpc/schemas/deployments/users/ParticipantData.json index 355e27958..255a7033b 100644 --- a/rpc/schemas/deployments/users/ParticipantData.json +++ b/rpc/schemas/deployments/users/ParticipantData.json @@ -6,13 +6,14 @@ "common": { "$ref": "../users/ParticipantDataMap.json" }, "roles": { "type": "array", - "items": { "$ref": "#/$defs/RoleData" } + "items": { "$ref": "#RoleData" } } }, "required": [ "studyDeploymentId", "common", "roles" ], "additionalProperties": false, "$defs": { "RoleData": { + "$anchor": "RoleData", "type": "object", "properties":{ "roleName": { "type": "string" }, diff --git a/rpc/schemas/protocols/ProtocolFactoryService/ProtocolFactoryServiceRequest.json b/rpc/schemas/protocols/ProtocolFactoryService/ProtocolFactoryServiceRequest.json index caa211be3..3a5d5a907 100644 --- a/rpc/schemas/protocols/ProtocolFactoryService/ProtocolFactoryServiceRequest.json +++ b/rpc/schemas/protocols/ProtocolFactoryService/ProtocolFactoryServiceRequest.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/CreateCustomProtocol" } + { "$ref": "#CreateCustomProtocol" } ], "$defs": { "ApiVersion": { "const": "1.1" }, diff --git a/rpc/schemas/protocols/ProtocolService/ProtocolServiceRequest.json b/rpc/schemas/protocols/ProtocolService/ProtocolServiceRequest.json index 7061c74d9..461d9e861 100644 --- a/rpc/schemas/protocols/ProtocolService/ProtocolServiceRequest.json +++ b/rpc/schemas/protocols/ProtocolService/ProtocolServiceRequest.json @@ -1,12 +1,12 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/Add" }, - { "$ref": "#/$defs/AddVersion" }, - { "$ref": "#/$defs/UpdateParticipantDataConfiguration" }, - { "$ref": "#/$defs/GetBy" }, - { "$ref": "#/$defs/GetAllForOwner" }, - { "$ref": "#/$defs/GetVersionHistoryFor" } + { "$ref": "#Add" }, + { "$ref": "#AddVersion" }, + { "$ref": "#UpdateParticipantDataConfiguration" }, + { "$ref": "#GetBy" }, + { "$ref": "#GetAllForOwner" }, + { "$ref": "#GetVersionHistoryFor" } ], "$defs": { "ApiVersion": { "const": "1.1" }, diff --git a/rpc/schemas/protocols/StudyProtocolSnapshot.json b/rpc/schemas/protocols/StudyProtocolSnapshot.json index 3e427edbe..f4904df43 100644 --- a/rpc/schemas/protocols/StudyProtocolSnapshot.json +++ b/rpc/schemas/protocols/StudyProtocolSnapshot.json @@ -18,7 +18,7 @@ }, "connections": { "type": "array", - "items": { "$ref": "#/$defs/DeviceConnection" } + "items": { "$ref": "#DeviceConnection" } }, "tasks": { "type": "array", @@ -54,6 +54,7 @@ "additionalProperties": false, "$defs": { "DeviceConnection": { + "$anchor": "DeviceConnection", "type": "object", "properties": { "roleName": { "type": "string" }, diff --git a/rpc/schemas/studies/RecruitmentService/RecruitmentServiceRequest.json b/rpc/schemas/studies/RecruitmentService/RecruitmentServiceRequest.json index 59b656050..e7da023d4 100644 --- a/rpc/schemas/studies/RecruitmentService/RecruitmentServiceRequest.json +++ b/rpc/schemas/studies/RecruitmentService/RecruitmentServiceRequest.json @@ -1,13 +1,13 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/AddParticipantByEmailAddress" }, - { "$ref": "#/$defs/AddParticipantByUsername" }, - { "$ref": "#/$defs/GetParticipant" }, - { "$ref": "#/$defs/GetParticipants" }, - { "$ref": "#/$defs/InviteNewParticipantGroup" }, - { "$ref": "#/$defs/GetParticipantGroupStatusList" }, - { "$ref": "#/$defs/StopParticipantGroup" } + { "$ref": "#AddParticipantByEmailAddress" }, + { "$ref": "#AddParticipantByUsername" }, + { "$ref": "#GetParticipant" }, + { "$ref": "#GetParticipants" }, + { "$ref": "#InviteNewParticipantGroup" }, + { "$ref": "#GetParticipantGroupStatusList" }, + { "$ref": "#StopParticipantGroup" } ], "$defs": { "ApiVersion": { "const": "1.2" }, diff --git a/rpc/schemas/studies/StudyService/StudyServiceRequest.json b/rpc/schemas/studies/StudyService/StudyServiceRequest.json index 5ef70e62f..a294f5262 100644 --- a/rpc/schemas/studies/StudyService/StudyServiceRequest.json +++ b/rpc/schemas/studies/StudyService/StudyServiceRequest.json @@ -1,16 +1,16 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/CreateStudy" }, - { "$ref": "#/$defs/SetInternalDescription" }, - { "$ref": "#/$defs/GetStudyDetails" }, - { "$ref": "#/$defs/GetStudyStatus" }, - { "$ref": "#/$defs/GetStudiesOverview" }, - { "$ref": "#/$defs/SetInvitation" }, - { "$ref": "#/$defs/SetProtocol" }, - { "$ref": "#/$defs/RemoveProtocol" }, - { "$ref": "#/$defs/GoLive" }, - { "$ref": "#/$defs/Remove" } + { "$ref": "#CreateStudy" }, + { "$ref": "#SetInternalDescription" }, + { "$ref": "#GetStudyDetails" }, + { "$ref": "#GetStudyStatus" }, + { "$ref": "#GetStudiesOverview" }, + { "$ref": "#SetInvitation" }, + { "$ref": "#SetProtocol" }, + { "$ref": "#RemoveProtocol" }, + { "$ref": "#GoLive" }, + { "$ref": "#Remove" } ], "$defs": { "ApiVersion": { "const": "1.1" }, diff --git a/rpc/schemas/studies/StudyStatus.json b/rpc/schemas/studies/StudyStatus.json index 37953c6c2..5b8e15adf 100644 --- a/rpc/schemas/studies/StudyStatus.json +++ b/rpc/schemas/studies/StudyStatus.json @@ -1,8 +1,8 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/Configuring" }, - { "$ref": "#/$defs/Live" } + { "$ref": "#Configuring" }, + { "$ref": "#Live" } ], "$defs": { "StudyStatus": { diff --git a/rpc/schemas/studies/users/ParticipantGroupStatus.json b/rpc/schemas/studies/users/ParticipantGroupStatus.json index 080c988b8..1fdecbe66 100644 --- a/rpc/schemas/studies/users/ParticipantGroupStatus.json +++ b/rpc/schemas/studies/users/ParticipantGroupStatus.json @@ -1,10 +1,10 @@ { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { "$ref": "#/$defs/Staged" }, - { "$ref": "#/$defs/Invited" }, - { "$ref": "#/$defs/Running" }, - { "$ref": "#/$defs/Stopped" } + { "$ref": "#Staged" }, + { "$ref": "#Invited" }, + { "$ref": "#Running" }, + { "$ref": "#Stopped" } ], "$defs": { "ParticipantGroupStatus": { @@ -20,6 +20,7 @@ "required": [ "__type", "id", "participants" ] }, "InDeployment": { + "$anchor": "InDeployment", "allOf": [ { "$ref": "#/$defs/ParticipantGroupStatus" } ], "properties": { "invitedOn": { "type": "string", "format": "date-time" }, @@ -42,7 +43,7 @@ } }, "Running": { - "$anchor": "DeployingDevices", + "$anchor": "Running", "allOf": [ { "$ref": "#/$defs/InDeployment" } ], "properties": { "__type": { "const": "dk.cachet.carp.studies.application.users.ParticipantGroupStatus.Running" }, @@ -51,7 +52,7 @@ "required": [ "startedOn" ] }, "Stopped": { - "$anchor": "Running", + "$anchor": "Stopped", "allOf": [ { "$ref": "#/$defs/InDeployment" } ], "properties": { "__type": { "const": "dk.cachet.carp.studies.application.users.ParticipantGroupStatus.Stopped" },