-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
RefResolver export function for resolving references #419
Conversation
@Julian hey not entirely sure why some of these Draft6 tests are failing only added a new function and test. the test i wrote for this passes so was curious if you could help me debug? |
Hey!
Going to likely be due to the combination of the draft 6 tests hitting the
network at the minute (because of an unfinished part of its implementation)
+ the json-schema.org site being down at the minute.
Would ignore it, I can have a look!
(Haven't reviewed this yet)
…On Mon, Jun 4, 2018, 00:14 Emmanuel ***@***.***> wrote:
@Julian <https://github.com/Julian> hey not entirely sure why some of
these Draft6 tests are failing only added a new function and test. the test
i wrote for this passes so was curious if you could help me debug?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#419 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUIXh8TkOKHGlquVUsMnR0gg1lvjD1jks5t5LQqgaJpZM4UYaYh>
.
|
How would this behave, or expected to behave, with recursive references? I guess it can only give up, right? |
I'm not fully sure the consequences, but python is fine with recursive data structures, so I don't think that should be a problem. |
Hmm, true, guess one would have to be quite careful though not to try and perform any kind of tree-like traversal though :) |
So, sorry for letting this sit around for so long, but I think this should really live externally to jsonschema as a small library on top. (It even might want to have a CLI that takes a file with refs and resolves them). But yeah as-is, other than that there's the known bug that jsonschema has with location-independent references, I don't think there's a good enough reason to require that this lives in the library itself. Happy to hear further thoughts, but for now going to close. Of course much appreciated, and apologies again that I couldn't make my mind up sooner. |
86f52b87 Fix a clear copy-paste error in the case names for tests from #394. ec18a7d0 Merge pull request #360 from notEthan/duplicate_uris cd9a4b9d change schemas with duplicate URIs http://localhost:1234/folder/ 43e190e0 Merge pull request #394 from rjmill/rjmill/bools-and-1s-and-0s-inside-objects-and-arrays 85f0d459 Merge pull request #419 from ChALkeR/chalker/format-uri 54436216 Merge pull request #420 from ChALkeR/chalker/format/ip6 ad47b726 Add long valid and invalid ipv6 b2ab70ec More optional ipv6 tests 37189ae6 Test that uri format scheme is validated for allowed chars 2106ed17 backport uniqueItems cases to draft3 49fc2a95 backport const test cases to draft6 79fe60c0 more tests for true != 1 and false != 0 inside objects/arrays git-subtree-dir: json git-subtree-split: 86f52b87e3d572b8f808dd074a6b95c3695ba992
I had a use-case to take a schema with references and create a ref-resovled version.
I figured this maybe useful for other users to have the ability to export a reference resolved version of a schema.
Additions
Testcase Example
Before
after