Describe the issue
I want to understand how the validate function works, but I got lost in all the class inheritance and couldn't find exactly where this happens in the codebase.
Would you please be openminded to document:
what is the "source of truth" to validate resources, (I assume XML or JSON structure definitions from hl7 website... does it download ResourceType.{json, xml}, what's the link used to get those?)
how does it compare this "source of truth" to the data?
Environment (please complete the following information):
Describe the issue I want to understand how the validate function works, but I got lost in all the class inheritance and couldn't find exactly where this happens in the codebase.
Would you please be openminded to document:
ResourceType.{json, xml}
, what's the link used to get those?)Environment (please complete the following information):
Additional context FhirInstanceValidator.validate method - https://github.com/hapifhir/hapi-fhir/blob/2633cbd1415bb9a72e4d1a7feab6587709e18ffe/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java#L222
FhirInstanceValidator.validate invokes ValidatorWrapper.validate - https://github.com/hapifhir/hapi-fhir/blob/2633cbd1415bb9a72e4d1a7feab6587709e18ffe/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java#L104
ValidatorWrapper.validate invokes InstanceValidator.validate - https://github.com/hapifhir/hapi-fhir/blob/2633cbd1415bb9a72e4d1a7feab6587709e18ffe/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java#L104
Where is the code for InstanceValidator.validate?
import org.hl7.fhir.validation.instance.InstanceValidator;
https://hapifhir.io/hapi-fhir/docs/validation/instance_validator.html
Might be a dumb question, but clarity can help newcomers contribute to the codebase