-
Notifications
You must be signed in to change notification settings - Fork 271
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
Deferencing $ref in json schema is not working after upgrade to v3 [part 2] #5362
Comments
Thank you for reporting an issue! Pinging @andreaTP to respond or triage. |
To be able to help I would need to know how you registered the schema. For some reason it's detecting the wrong dereferencer, so I need to know that the internal state of your data (more specifically the artifactType) to be able to reproduce and eventually fix this. |
Create the child
Create the parent which references the child
returns the parent schema without any dereferencing as expected
returns
I wasn't sure whether to use the name or the $id as the $ref value but tried both name and $id with the same result. Have checked |
I just tested your example and it works fine except for the fact that I get the following error, due to the draft being incorrectly set:
The draft identifier is missing a # at the end. This is what I've done:
And then get the content:
There is one thing I noticed, and is the fact that, in the $ref in the main content, you're using a full URL. That won't work. That value must be the same as the name of the reference. |
Yeah I mentioned above that I tried both the name and the $id (full url) as the $ref but neither worked. It's strange that you're getting a unsupported draft identifier exception and I am not. Is there a setting that could cause that to happen? |
No, no setting. One thing I notice is that you're using what seems to be a local build of the application, since the version is |
Thanks for that, I somehow had a SNAPSHOT version. The unknown/unsupported data model error is no more. However, the setup we had for refs is no longer working - we'd previously named the artifacts using full urls so that any reference matched the id of the reference, eg "$ref": "https://x.com/_common/timezone.json" would resolve to the artifact named "https://x.com/_common/timezone.json" This worked in v2, but works no more in v3. Now I get
|
I don't know how you created the references, but doing this worked just fine:
|
Thanks for your patience! I removed all my schemas and re-added and it is now working fine |
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"
This is related to #5296 - a PR was merged for it but it's still not working. As you can see I'm running 3.0.1
To reproduce
/groups/GROUP/artifacts/ARTIFACT/versions/VERSION/content?references=DEREFERENCE
Parent schema:
Referenced schema:
The text was updated successfully, but these errors were encountered: