Closed mmmmillar closed 1 month ago
The stack trace indicates that the wrong dereferencer is being used. Your content indicates the schemas are both JSON Schema, but the code is trying to dereference as though it's OpenAPI or AsyncAPI. Can you query the meta-data of your two artifacts and see what they say?
Either use the UI or something like this in curl:
curl http://registry.example.org/apis/registry/v3/groups/GROUP/artifacts/ARTIFACT
The result should include an artifactType
that will tell us what the system thinks it is.
Parent:
{
"name": "https://x.com/night_time/front_door_open_detected.json",
"owner": "",
"createdOn": "2024-09-30T14:20:49Z",
"modifiedBy": "",
"modifiedOn": "2024-09-30T14:20:49Z",
"artifactType": "JSON",
"groupId": "night_time",
"artifactId": "63e116dc-8e7e-6722-d47f-a67d14baf899"
}
Child:
{
"name": "https://x.com/_common/timezone.json",
"owner": "",
"createdOn": "2024-09-30T14:20:47Z",
"modifiedBy": "",
"modifiedOn": "2024-09-30T14:20:47Z",
"artifactType": "JSON",
"groupId": "_common",
"artifactId": "3350d0bf-ef9e-9d0a-7320-2924b3b9919f"
}
Okay thank you for the information. The server obviously knows that the content is json schema. So I'm not sure why it is trying to use the wrong code to provide the dereferencing. You will have to try and reproduce this locally in a test and then fix.
So this has been a mistake on our side. We never ported the json schema dereferencing work to 3.0. I fixed that in the PR I attached. We'll do a new release (likely this week) with that fixed. Sorry for the inconvenience.
Deferencing $ref in json schema is not working after upgrade to v3. The error I'm getting is "Unknown/unsupported data model type or version"
The referenced artifact shows correctly in the parent artifacts references in the registry
Version: 3.0.0 Persistence type: sql
/groups/GROUP/artifacts/ARTIFACT/versions/VERSION/content?references=DEREFERENCE
Parent schema:
Referenced schema: