Hello community, here is the log from the commit of package perl-JSON-Validator for openSUSE:Factory checked in at 2020-07-05 01:18:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-JSON-Validator (Old) and /work/SRC/openSUSE:Factory/.perl-JSON-Validator.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-JSON-Validator" Sun Jul 5 01:18:07 2020 rev:20 rq:818550 version:4.01 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-JSON-Validator/perl-JSON-Validator.changes 2020-06-10 00:48:03.134887861 +0200 +++ /work/SRC/openSUSE:Factory/.perl-JSON-Validator.new.3060/perl-JSON-Validator.changes 2020-07-05 01:19:59.613336233 +0200 @@ -1,0 +2,9 @@ +Wed Jul 1 03:09:34 UTC 2020 - Tina Müller <timueller+p...@suse.de> + +- updated to 4.01 + see /usr/share/doc/packages/perl-JSON-Validator/Changes + + 4.01 2020-06-30T17:42:08+0900 + - Fix combining "allOf" and "not" #218 + +------------------------------------------------------------------- Old: ---- JSON-Validator-4.00.tar.gz New: ---- JSON-Validator-4.01.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-JSON-Validator.spec ++++++ --- /var/tmp/diff_new_pack.wli0ti/_old 2020-07-05 01:20:02.909346343 +0200 +++ /var/tmp/diff_new_pack.wli0ti/_new 2020-07-05 01:20:02.913346355 +0200 @@ -17,7 +17,7 @@ Name: perl-JSON-Validator -Version: 4.00 +Version: 4.01 Release: 0 %define cpan_name JSON-Validator Summary: Validate data against a JSON schema ++++++ JSON-Validator-4.00.tar.gz -> JSON-Validator-4.01.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.00/Changes new/JSON-Validator-4.01/Changes --- old/JSON-Validator-4.00/Changes 2020-06-08 03:41:55.000000000 +0200 +++ new/JSON-Validator-4.01/Changes 2020-06-30 10:42:08.000000000 +0200 @@ -1,5 +1,8 @@ Revision history for perl distribution JSON-Validator +4.01 2020-06-30T17:42:08+0900 + - Fix combining "allOf" and "not" #218 + 4.00 2020-06-08T10:41:55+0900 - JSON::Validator::schema() now holds a JSON::Validator::Schema object instead of Mojo::JSON::Pointer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.00/MANIFEST new/JSON-Validator-4.01/MANIFEST --- old/JSON-Validator-4.00/MANIFEST 2020-06-08 03:41:56.000000000 +0200 +++ new/JSON-Validator-4.01/MANIFEST 2020-06-30 10:42:10.000000000 +0200 @@ -80,6 +80,7 @@ t/issue-59-oneof-blessed-booleans.t t/issue-71-additionalproperties.t t/joi.t +t/jv-allof-and-not.t t/jv-allof.t t/jv-anyof.t t/jv-array.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.00/META.json new/JSON-Validator-4.01/META.json --- old/JSON-Validator-4.00/META.json 2020-06-08 03:41:56.000000000 +0200 +++ new/JSON-Validator-4.01/META.json 2020-06-30 10:42:09.000000000 +0200 @@ -4,7 +4,7 @@ "Jan Henning Thorsen <jhthor...@cpan.org>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], @@ -63,6 +63,6 @@ }, "x_IRC" : "irc://irc.freenode.net/#mojo" }, - "version" : "4.00", - "x_serialization_backend" : "JSON::PP version 4.02" + "version" : "4.01", + "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.00/META.yml new/JSON-Validator-4.01/META.yml --- old/JSON-Validator-4.00/META.yml 2020-06-08 03:41:56.000000000 +0200 +++ new/JSON-Validator-4.01/META.yml 2020-06-30 10:42:09.000000000 +0200 @@ -9,7 +9,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -32,5 +32,5 @@ homepage: https://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/mojolicious/json-validator.git -version: '4.00' +version: '4.01' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.00/lib/JSON/Validator.pm new/JSON-Validator-4.01/lib/JSON/Validator.pm --- old/JSON-Validator-4.00/lib/JSON/Validator.pm 2020-06-08 03:41:55.000000000 +0200 +++ new/JSON-Validator-4.01/lib/JSON/Validator.pm 2020-06-30 10:42:08.000000000 +0200 @@ -23,7 +23,7 @@ use constant SPECIFICATION_URL => 'http://json-schema.org/draft-04/schema#'; use constant YAML_SUPPORT => eval 'use YAML::XS 0.67;1'; -our $VERSION = '4.00'; +our $VERSION = '4.01'; our @EXPORT_OK = qw(joi validate_json); our %SCHEMAS = ( @@ -606,8 +606,8 @@ } if (my $rules = $schema->{not}) { - push @errors, $self->_validate($to_json ? $$to_json : $_[1], $path, $rules); - return @errors ? () : (E $path, [not => 'not']); + my @e = $self->_validate($to_json ? $$to_json : $_[1], $path, $rules); + push @errors, E $path, [not => 'not'] unless @e; } if (my $rules = $schema->{allOf}) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.00/t/jv-allof-and-not.t new/JSON-Validator-4.01/t/jv-allof-and-not.t --- old/JSON-Validator-4.00/t/jv-allof-and-not.t 1970-01-01 01:00:00.000000000 +0100 +++ new/JSON-Validator-4.01/t/jv-allof-and-not.t 2020-06-30 10:38:41.000000000 +0200 @@ -0,0 +1,29 @@ +use lib '.'; +use t::Helper; + +note 'Property "required" must be present'; +my $missing = E '/required', '/allOf/0 Missing property.'; +my $schema = {type => 'object', allOf => [{required => ['required']}]}; + +my @tests = ( + [{foo => 1, required => 2}, $schema], + [{foo => 2, forbidden => 3}, $schema, $missing], + [{foo => 3, forbidden => 3, required => 2}, $schema], + [{foo => 4}, $schema, $missing] +); + +validate_ok @$_ for @tests; + +note 'Property "forbidden" must not be present'; +$schema->{not} = {required => ['forbidden']}; +splice @{$tests[1]}, 2, 0, E '/', 'Should not match.'; +$tests[2][2] = E '/', 'Should not match.'; +validate_ok @$_ for @tests; + +note 'Move "not" constraint to "allOf"'; +push @{$schema->{allOf}}, {not => delete $schema->{not}}; +$tests[1][2] = $tests[2][2] = E '/', '/allOf/1 Should not match.'; +$tests[1][3] = $missing; +validate_ok @$_ for @tests; + +done_testing;