-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance-level history fullUrl is wrong when resource id begins with resource type name #3501
Labels
bug
Something isn't working
Comments
pointed to account for the changes in "additional context" as well |
lmsurpre
changed the title
Instance-level history fullUrl have duplicate resource type
Instance-level history fullUrl is wrong when resource id begins with resource type name
Mar 24, 2022
lmsurpre
added a commit
that referenced
this issue
Mar 24, 2022
We had duplicate logic in two classes: * FHIRResource.getRequestBaseUri * FHIRRestHelper.getRequestBaseUri For #2965, we fixed the version in FHIRResource but missed the one in FHIRRestHelper. Now I combined the two implementations into FHIRRestHelper, made it static, and removed the version from FHIRResource. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 24, 2022
We had duplicate logic in two classes: * FHIRResource.getRequestBaseUri * FHIRRestHelper.getRequestBaseUri For #2965, we fixed the version in FHIRResource but missed the one in FHIRRestHelper. Now I combined the two implementations into FHIRRestHelper, made it static, and removed the version from FHIRResource. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 24, 2022
We had duplicate logic in two classes: * FHIRResource.getRequestBaseUri * FHIRRestHelper.getRequestBaseUri For #2965, we fixed the version in FHIRResource but missed the one in FHIRRestHelper. Now I combined the two implementations into FHIRRestHelper, made it static, and removed the version from FHIRResource. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
For number 3 ( |
lmsurpre
added a commit
that referenced
this issue
Mar 24, 2022
For both `Entry.fullUrl` and `Entry.response.location`. I also added the etag element to the Entry.response objects to be more consistent with the instance-level history implementation. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 25, 2022
1. add Entry.response.location to instance-history response 2. set 201 for the initial create entry (we need #3507 for the undelete case) 3. remove the status code name from Entry.response.status for system and type-level history interactions (e.g. `200 OK` -> `200`) Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 25, 2022
We had duplicate logic in two classes: * FHIRResource.getRequestBaseUri * FHIRRestHelper.getRequestBaseUri For #2965, we fixed the version in FHIRResource but missed the one in FHIRRestHelper. Now I combined the two implementations into FHIRRestHelper, made it static, and removed the version from FHIRResource. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 25, 2022
For both `Entry.fullUrl` and `Entry.response.location`. I also added the etag element to the Entry.response objects to be more consistent with the instance-level history implementation. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 25, 2022
1. add Entry.response.location to instance-history response 2. set 201 for the initial create entry (we need #3507 for the undelete case) 3. remove the status code name from Entry.response.status for system and type-level history interactions (e.g. `200 OK` -> `200`) Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
added a commit
that referenced
this issue
Mar 25, 2022
1. add Entry.response.location to instance-history response 2. set 201 for the initial create entry (we need #3507 for the undelete case) 3. remove the status code name from Entry.response.status for system and type-level history interactions (e.g. `200 OK` -> `200`) Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
verified that the _history full url is now correct with a couple of different resources. Closing issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
While testing instance-level history, I noticed that the Bundle.entry.fullUrl we are returning are duplicating the resource type in their paths when the resource id starts with the resource type name (e.g. "Patient1")
Looks like this is the same as #2965 except for fullUrls (instead of location URIs)
Environment
main
To Reproduce
Steps to reproduce the behavior:
Note that the fullUrl contains an extra type in the path (e.g. https://localhost:9443/fhir-server/api/v4/Patient/Patient/Patient1)
Expected behavior
The fullUrl should be the correct URL to the resource
Additional context
I also noticed a couple other differences between our instance-level history and the new system and type-level history endpoints.
For number 1, I actually think the instance-level interaction is more correct... @punktilious how costly would it be to return full url instead of relative url in our system and type-level history responses?
For number 2, I think we should add Response.location to the instance-level response. Maybe a separate ticket?
For number 3, I think we should modify the instance-level response to use 201 for creates to match. We should also be consistent as to whether we include just the numerical HTTP response code ("200") or also include the response code title ("200 OK"). Separate issue?
The text was updated successfully, but these errors were encountered: