-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Have a JSON-AD object that references a parent using a local-id, and the parent defined after that:
[
{
"https://atomicdata.dev/properties/localId": "child",
"https://atomicdata.dev/properties/parent": "parent"
},
{
"https://atomicdata.dev/properties/localId": "parent"
}
]
We get an error:
Unable to import JSON-AD. Unable to parse resource in array. Unauthorized. No parent found for https://atomicdata.dev/importer/3cdk2343yrq/child
This happens, because the parent
mentioned does not exist when the first resource is being parsed.
If we invert the order, we're good to go:
[
{
"https://atomicdata.dev/properties/localId": "parent"
},
{
"https://atomicdata.dev/properties/localId": "child",
"https://atomicdata.dev/properties/parent": "parent"
}
]
How to deal with this
- Improve error message, instruct users to use a specific import order (first the parents, then the children)
- Automatically generate referenced parents as empty resources, they'll be overwritten later on automatically.
Metadata
Metadata
Assignees
Labels
No labels