You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: operation/fhir-operation-validate/src/main/java/org/linuxforhealth/fhir/operation/validate/ValidateOperation.java
* 1. Validate if a resource validation mode code is valid.
125
-
* 2. Validate an interaction for a specified resource type.
126
-
* 3. Validate if persistence layer implementation supports update/create mode if mode = create.
127
-
* 4. Validate if persistence layer implementation supports update/create mode if mode = update but the resource doesnot exist yet in the DB.
128
-
* 5. Validate if modes update and delete are only be used when the operation is invoked at the resource instance level
119
+
* This method does the following validations if modeType(mode parameter) is not null. If the mode parameter is null then the below validations are skipped.
120
+
* 1. Validate an interaction for a specified resource type.
121
+
* 2. Validate if persistence layer implementation supports update/create mode if mode = create.
122
+
* 3. Validate if persistence layer implementation supports update/create mode if mode = update but the resource doesnot exist yet in the DB.
123
+
* 4. Validate if modes update and delete are only be used when the operation is invoked at the resource instance level
129
124
*
130
125
* @param modeParameter resource validation mode code to be validated
131
126
* @param resourceHelper Resource operation provider for loading related Library resources
Copy file name to clipboardExpand all lines: operation/fhir-operation-validate/src/test/java/org/linuxforhealth/fhir/operation/validate/ValidateOperationTest.java
+5-7Lines changed: 5 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -493,7 +493,7 @@ public void testValidateOperationDeleteSupported() throws FHIROperationException
493
493
494
494
495
495
/**
496
-
* Test validate operation with create mode type code and "update/create" enabled.
496
+
* Test validate operation with update mode type code and "update/create" enabled.
497
497
* Validate the outcome when the persistence layer implementation supports the "update/create" operation
498
498
* @throws Exception
499
499
*
@@ -513,7 +513,7 @@ public void testValidateOperationWithUpdateCreateEnabled() throws Exception {
513
513
.build(),
514
514
Parameter.builder()
515
515
.name("mode")
516
-
.value(Code.of("create"))
516
+
.value(Code.of("update"))
517
517
.build())
518
518
.build();
519
519
FHIROperationContextoperationContext =
@@ -546,12 +546,12 @@ public void testValidateOperationWithUpdateCreateEnabled() throws Exception {
546
546
}
547
547
548
548
/**
549
-
* Test validate operation with create mode type code and "update/create" disabled.
549
+
* Test validate operation with update mode type code and "update/create" disabled.
550
550
* Validate the outcome when the persistence layer implementation does not support the "update/create" operation
551
551
* @throws Exception
552
552
*
553
553
*/
554
-
@Test(expectedExceptions = { FHIROperationException.class } , expectedExceptionsMessageRegExp = ".*Resource create, of type 'Patient', is not supported.*")
554
+
@Test(expectedExceptions = { FHIROperationException.class } , expectedExceptionsMessageRegExp = ".*Resource update, of type 'Patient', is not supported.*")
0 commit comments