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

FHIRUrl sServiceUrl parameters are not considered #259

Open
Revest117 opened this issue May 5, 2021 · 5 comments
Open

FHIRUrl sServiceUrl parameters are not considered #259

Revest117 opened this issue May 5, 2021 · 5 comments

Comments

@Revest117
Copy link

Describe the bug
If the FHIRUrl is initialized with a sServiceUrl that contains a parameter, the sUrl is simply added after the parameter, creating an invalid ressource request call.

Current Example
sServiceUrl = "/test/url/with?parameters=true"
sUrl = "/added/path"

result = "/test/url/with?parameters=true/added/path"

Expected behavior
The parameters from sServiceUrl are added after the complete url.

Expected Example
sServiceUrl = "/test/url/with?parameters=true"
sUrl = "/added/path"

result = "/test/url/with/added/path?parameters=true"

OpenUI5-FHIR version

  • OpenUI5-FHIR 2.2.2

SAPUI5 version

  • SAPUI5 1.72.30
@Revest117
Copy link
Author

After further testing, I noticed that this problem is present throughout the project.

Because the serviceUrl is stored in multiple locations, there is no one place to fix it.

@AmirthavalliG
Copy link
Member

@Revest117 : Apologies for the delay. Could you explain your scenario more on what exactly is the need for having query params as part of service url ? There is the defaultQueryParameters during the model initialization that can be used if you want to pass on resource type requests.

@Revest117
Copy link
Author

@AmirthavalliG : Hi, it's not that I need these query parameters, but they are added by default in SAPUI5 in deployed state. Assuming that the oData classes of SAPUI5 can handle this I assumed that the bug exists in the FHIR library.

I use the FHIR library primarily via the configuration in manifest.json.

@AmirthavalliG
Copy link
Member

@Revest117 : Can you share a sample reference app to analyse the issue further

@Revest117
Copy link
Author

@AmirthavalliG : Hi, sorry for writing back this late.

I initialize the FHIRModel via the manifest in:
"sap.ui5": {
"models": {
"Condition": {
"type": "sap.fhir.model.r4.FHIRModel",
"dataSource": "zprincipa"
}
}
}

and after that I simply request the resource via sendGetRequest.

This error occurs after I deploy the project on SAP FIORI Launchpad. In a local environment I don't have this error because I don't put any parameters in the base URL, but it seems that the SAP FIORI Launchpad initializes the models with a base URL that contains a parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants