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

Parse and Handle Incorrectly Labeled Responses from DSTU 2 API Endpoints #124

Open
mc962 opened this issue Aug 10, 2022 · 0 comments
Open

Comments

@mc962
Copy link

mc962 commented Aug 10, 2022

Summary

We're trying to use this library to interact with the vendor's API for retrieving Contracts from the vendor's DSTU2 endpoint. In particular, we are using the Contract.where() method to search for Contracts for a particular Patient.

I'm dealing with what seems to be incorrect responses being returned from the vendor's API for the Contract resource. In particular, the subType key in the response seems to be getting returned as subtype by the vendor's API. This predictably leads to a message like Superfluous entry "subtype" in data for <Contract object>, because presumably this library thinks that there is an extra unnecessary subtype key that should not be there, instead of subType as expected by the library/specification.

Questions

  • Is there a good way to deal with improperly named fields in the response in this way, as provided by the library? Like if there was some way to configure the Contract resource to expect subtype instead of subType?
  • If this isn't currently available by the library, is there a good workaround/hook/modification that I could do to modify the Contract resource and/or Client response to deal with this incorrectly labeled response key?
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

1 participant