-
Notifications
You must be signed in to change notification settings - Fork 354
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
Update to version 5.0 from version 1.6 #586
Comments
References are resolved as they are needed, rather than a preprocessing step as your example shows. We don't provide a preprocessor that does this. Can you expand a bit on what you are trying to achieve? You should never need to manually expand references. |
Hi, Many thanks for your reply. contents of common.json
contents of foo.json
|
@harikakatkam Could you please clarify what the problem is? Cross-file references should work out of the box; you don't need to do anything special. No, we do not yet have a release which supports draft-07. |
Thanks @erayd for your help, could you please provide me with a snippet that validates schemas with this structure. Cheers, |
@hkatkam-eagleeye Your example above is fine. The only thing you need to change is the ref in
|
@hkatkam-eagleeye Here's an example PHP script: <?php
require "vendor/autoload.php";
use JsonSchema\Constraints\Constraint;
use JsonSchema\Validator;
$schema = (object)['$ref' => 'file://' . realpath('./external/foo.json')];
$data = json_decode(file_get_contents('test.json'));
$validator = new Validator();
$validator->validate($data, $schema, Constraint::CHECK_MODE_EXCEPTIONS); |
@harikakatkam / @hkatkam-eagleeye in an attempt to cleanup this repo we are trying to filter the issues and see which ones might be closed. Is it safe to assume this is a rather old issue, which sadly was left unanswered, and can be closed? Feel free to close it yourself with some comments if helpful. |
Hi,
we have Version 1.6 implememted nearly 3 years ago, its working fine, now we wanted to upgrade to version 5.6, we are seeing issues when trying to resolve references ..we are always seeing
no fragments found error
This is how we resolve in version 1.6
we couldn't find the alternate similar to
RefResolver
, usingSchemaStorage
is not resolving the references.Any help would be much appreciated
Thanks,
Harika
The text was updated successfully, but these errors were encountered: