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

Invalid error message when validating contained resources #413

Open
mmsmits opened this issue Jan 13, 2025 · 2 comments
Open

Invalid error message when validating contained resources #413

mmsmits opened this issue Jan 13, 2025 · 2 comments

Comments

@mmsmits
Copy link
Member

mmsmits commented Jan 13, 2025

Preconditions:

  1. Contained resource mistakenly does not have an id
  2. id of the parent is the same as the indented contained resource
  3. Reference from parent to contained resource is present
{
    "resourceType": "Observation",
    "id": "test",
        "contained": [
        {
            "resourceType": "DeviceMetric",
            "type": {
                "text": "test"
            },
            "category": "setting",
            "source": {
                "reference": "Device/test"
            }
        }
    ],
    "status": "final",
    "code": {
        "text": "test"
    },
    "device": {
        "reference": "#test"
    }
}

=> "text": "Resource contains a circular reference at <path> and cannot be validated."

@mmsmits
Copy link
Member Author

mmsmits commented Jan 13, 2025

Moved from: https://firely.atlassian.net/browse/VONK-2912

@Kasdejong do you know if this solved?

@mmsmits
Copy link
Member Author

mmsmits commented Jan 15, 2025

We should probably only for contained resources called "test" and have an error like:
"Can't resolve contained resource "test". "

But first check if this still occurs in the new validator.

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

No branches or pull requests

1 participant