Describe the bug
When users invoke $validate with a mode of 'update', we do a few checks to ensure that the update would succeed.
Unfortunately, one check we're missing right now is the validation of the Resource.id
Specifically, that id needs to match the id passed in the URL ([base]/[resourceType]/[**id**]/$validate).
Otherwise the corresponding PUT is going to fail.
Environment
Which version of IBM FHIR Server?
To Reproduce
Steps to reproduce the behavior:
- draft a valid resource with a specific id (e.g. a Patient with id=123)
- pass that resource to instance-level $validate with mode=update (e.g. to
[base]/Patient/xyz/$validate)
The validate returns 200 OK with no OperationOutcome issue of severity error.
Expected behavior
If the id of the resource doesn't match the id of the URL, it should return a 200 OK that includes an OperationOutcome which has:
- IssueSeverity of ERROR
- Details that describe the problem (resource id must match the path parameter id)
Additional context
Describe the bug
When users invoke $validate with a mode of 'update', we do a few checks to ensure that the update would succeed.
Unfortunately, one check we're missing right now is the validation of the Resource.id
Specifically, that id needs to match the id passed in the URL (
[base]/[resourceType]/[**id**]/$validate).Otherwise the corresponding PUT is going to fail.
Environment
Which version of IBM FHIR Server?
To Reproduce
Steps to reproduce the behavior:
[base]/Patient/xyz/$validate)The validate returns 200 OK with no OperationOutcome issue of severity error.
Expected behavior
If the id of the resource doesn't match the id of the URL, it should return a 200 OK that includes an OperationOutcome which has:
Additional context