Skip to content

Commit

Permalink
Fix: JSON schema validator upgrade; remove hack
Browse files Browse the repository at this point in the history
Closes #492
  • Loading branch information
Whathecode committed Oct 31, 2024
1 parent 78935ed commit 76e8b25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies {
implementation "org.reflections:reflections:${versions.reflections}"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:${versions.serialization}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}"
implementation "com.networknt:json-schema-validator:1.5.2"
implementation "com.networknt:json-schema-validator:1.5.3"
implementation "commons-io:commons-io:${versions.apacheCommons}"

def generateForProjects = coreModules + commonModule
Expand Down
6 changes: 1 addition & 5 deletions rpc/schemas/common/devices/PrimaryDeviceConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@
}
],
"$defs": {
"HACK-SEE-ISSUE-492": true,
"PrimaryDeviceConfiguration": {
"$anchor": "PrimaryDeviceConfiguration",
"allOf": [ { "$ref": "DeviceConfiguration.json#DeviceConfiguration" } ],
"properties": {
"isPrimaryDevice": { "const": true },

"roleName": { "$ref": "#/$defs/HACK-SEE-ISSUE-492" },
"defaultSamplingConfiguration": { "$ref": "#/$defs/HACK-SEE-ISSUE-492" }
"isPrimaryDevice": { "const": true }
},
"required": [ "isPrimaryDevice" ]
}
Expand Down
6 changes: 1 addition & 5 deletions rpc/schemas/studies/users/ParticipantGroupStatus.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{ "$ref": "#Stopped" }
],
"$defs": {
"HACK-SEE-ISSUE-492": true,
"ParticipantGroupStatus": {
"type": "object",
"properties": {
Expand All @@ -25,10 +24,7 @@
"allOf": [ { "$ref": "#/$defs/ParticipantGroupStatus" } ],
"properties": {
"invitedOn": { "type": "string", "format": "date-time" },
"studyDeploymentStatus": { "$ref": "../../deployments/StudyDeploymentStatus.json" },

"id": { "$ref": "#/$defs/HACK-SEE-ISSUE-492" },
"participants": { "$ref": "#/$defs/HACK-SEE-ISSUE-492" }
"studyDeploymentStatus": { "$ref": "../../deployments/StudyDeploymentStatus.json" }
},
"required": [ "invitedOn", "studyDeploymentStatus" ]
},
Expand Down

0 comments on commit 76e8b25

Please sign in to comment.