An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
There is a bug in the operations controller for POST requests where it can never resolve a parameter in the request url. This is a largely blocking issue, as all FHIR operations need to support POST requests.
POST http://server_base/4_0_0/Patient/123/$my-operation logs undefined
Hypothesized Cause
In the code for adding a custom operation route, routeArgs.ID is passed in to the list of valid specific params to look for when doing the sanitizeMiddleware call. We can see that routeArgs.ID is defined here with name id.
My solution changes this part of the controller to access the property by its proper name, id. There should also probably be documentation to reflect this.
Let me know if you have any questions, or have a different solution in mind, and thanks for a great framework!
@zeevo unable to explicitly request your review, but bringing this to your attention since you seem to have responded to updates on this repo most recently
There is a bug in the operations controller for POST requests where it can never resolve a parameter in the request url. This is a largely blocking issue, as all FHIR operations need to support POST requests.
Example Scenario
The following scenario exposed this issue:
POST http://server_base/4_0_0/Patient/123/$my-operation
logsundefined
Hypothesized Cause
In the code for adding a custom operation route,
routeArgs.ID
is passed in to the list of valid specific params to look for when doing thesanitizeMiddleware
call. We can see thatrouteArgs.ID
is defined here with nameid
.Therefore, the operations controller code for accessing this will always result in
undefined
sinceresource_id
is not a thing.My solution changes this part of the controller to access the property by its proper name,
id
. There should also probably be documentation to reflect this.Let me know if you have any questions, or have a different solution in mind, and thanks for a great framework!