Skip to content
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

Deprecate the /Resource and /DomainResource endpoints #2526

Closed
lmsurpre opened this issue Jun 17, 2021 · 2 comments
Closed

Deprecate the /Resource and /DomainResource endpoints #2526

lmsurpre opened this issue Jun 17, 2021 · 2 comments
Assignees
Labels
deprecation removal this change involves removal of a component, class, method, etc

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Jun 17, 2021

In our DSTU2 implementation, we allowed a user to search on [base]/Resource to invoke whole-system search.

In #261 we made it possible to search via GET on [base]/ or by POST on [base]/_search.
However, we never actually removed the ability to interact with the /Resource and /DomainResource endpoints.

We should remove the /DomainResource and document the /Resource endpoint as deprecated. Once complete, we should open a separate task for removing the Resource endpoint as well.

Potentially relates to #2445

@lmsurpre lmsurpre added deprecation removal this change involves removal of a component, class, method, etc labels Jun 17, 2021
@lmsurpre lmsurpre added this to the Sprint 2021-09 milestone Jul 7, 2021
@lmsurpre lmsurpre self-assigned this Jul 7, 2021
lmsurpre added a commit that referenced this issue Jul 7, 2021
Because we use "Resource" as the resource type for whole-system search
and whole-system history interactions, it wasn't as simple as just
checking for abstract types in FHIRRestHelper.validateInteraction.
Instead, I now check that the type in the request path is valid directly
from the JAX-RS endpoints / bundle entry processing.
This has the additional benefit of catching URL path errors up front,
avoiding almost all work associated with a bad request.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jul 7, 2021
Because we use "Resource" as the resource type for whole-system search
and whole-system history interactions, it wasn't as simple as just
checking for abstract types in FHIRRestHelper.validateInteraction.
Instead, I now check that the type in the request path is valid directly
from the JAX-RS endpoints / bundle entry processing.
This has the additional benefit of catching URL path errors up front,
avoiding almost all work associated with a bad request.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jul 7, 2021
Because we use "Resource" as the resource type for whole-system search
and whole-system history interactions, it wasn't as simple as just
checking for abstract types in FHIRRestHelper.validateInteraction.
Instead, I now check that the type in the request path is valid directly
from the JAX-RS endpoints / bundle entry processing.
This has the additional benefit of catching URL path errors up front,
avoiding almost all work associated with a bad request.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jul 8, 2021
Because we use "Resource" as the resource type for whole-system search
and whole-system history interactions, it wasn't as simple as just
checking for abstract types in FHIRRestHelper.validateInteraction.
Instead, I now check that the type in the request path is valid directly
from the JAX-RS endpoints / bundle entry processing.
This has the additional benefit of catching URL path errors up front,
avoiding almost all work associated with a bad request.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre
Copy link
Member Author

lmsurpre commented Jul 8, 2021

I decided to deprecate these endpoints for 4.9.0 which basically just means:

  1. logging a warning when we serve requests at these endpoints
  2. adding this to the release notes under the deprecated section

lmsurpre added a commit that referenced this issue Jul 8, 2021
Previously we were not encoding the apostrophe in the result message but
now we are.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jul 8, 2021
Previously we were not encoding the apostrophe in the result message but
now we are.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@michaelwschroeder
Copy link
Contributor

Running with the latest code from the main branch on my local system, I executed the following search requests:
GET [base]/Resource?_id=test
GET [base]/DomainResource?_id=test
POST [base]/Resource/_search?_id=test
POST [base]/DomainResource/_search?_id=test

In all cases, I verified that one of the following two WARNING messages was issued as appropriate:
[WARNING ] Use of abstract resource types like 'Resource' in FHIR URLs is deprecated and will be removed in a future release
[WARNING ] Use of abstract resource types like 'DomainResource' in FHIR URLs is deprecated and will be removed in a future release

Issue verified and closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation removal this change involves removal of a component, class, method, etc
Projects
None yet
Development

No branches or pull requests

2 participants