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

Note from_contents functionality - don't merge #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlkennedy
Copy link

Note functionality of from_contents function:
When using from_contents for json, it will keep any conforming parts and get rid of the rest. It logs an error on the line FHIR.from_contents(json), and there is no error on cap.to_json. In the example in bad_capability.json, the resource field is deleted.

@arscan
Copy link
Member

arscan commented Jun 28, 2019

FYI @radamson -- After Nicole put together a test to highlight the issue that you saw, it looks like this behavior is intentional. fhir_models logs the error and parses what it can. It isn't breaking on to_json.

From a testing perspective, this is bad because we don't know that parts of the json that we parsed are invalid, we just know that parts are valid. I don't know if we want to change the behavior of fhir_models, or if we should add some kind of "_errors" element generically, or if we should just manage this in Inferno.

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

Successfully merging this pull request may close these issues.

2 participants