Describe the bug
This is in continuation with issue - https://github.com/hapifhir/hapi-fhir/issues/5727 (Raising new issue as I am unable to reopen it)
I used to pass object of Patient class which would have caused the warning to be lost.
Now I am trying to use raw string itself, but getting another issue. Pasting the code here:
java.lang.UnsupportedOperationException: JsonObject
at com.google.gson.JsonElement.getAsString(JsonElement.java:187)
at org.hl7.fhir.common.hapi.validation.validator.ValidatorWrapper.validate(ValidatorWrapper.java:184)
at org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator.validate(FhirInstanceValidator.java:239)
at org.hl7.fhir.common.hapi.validation.validator.BaseValidatorBridge.doValidate(BaseValidatorBridge.java:23)
at org.hl7.fhir.common.hapi.validation.validator.BaseValidatorBridge.validateResource(BaseValidatorBridge.java:59)
at org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator.validateResource(FhirInstanceValidator.java:27)
at ca.uhn.fhir.validation.FhirValidator.validateResource(FhirValidator.java:357)
at ca.uhn.fhir.validation.FhirValidator.doValidate(FhirValidator.java:273)
at ca.uhn.fhir.validation.FhirValidator.validateWithResult(FhirValidator.java:241)
at ca.uhn.fhir.validation.FhirValidator.validateWithResult(FhirValidator.java:224)
To Reproduce
validate payload with java hapi-fhir-validation library's validateWithResult method by passing a patient payload in json format.
Describe the bug This is in continuation with issue - https://github.com/hapifhir/hapi-fhir/issues/5727 (Raising new issue as I am unable to reopen it) I used to pass object of Patient class which would have caused the warning to be lost.
Now I am trying to use raw string itself, but getting another issue. Pasting the code here:
Issue log:
To Reproduce validate payload with java hapi-fhir-validation library's validateWithResult method by passing a patient payload in json format.
Environment -library used: implementation group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-validation', version: '6.10.2'