Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-JSON-Validator for
openSUSE:Factory checked in at 2021-09-14 21:14:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-JSON-Validator (Old)
and /work/SRC/openSUSE:Factory/.perl-JSON-Validator.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-JSON-Validator"
Tue Sep 14 21:14:12 2021 rev:34 rq:918698 version:4.23
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-JSON-Validator/perl-JSON-Validator.changes
2021-07-13 22:37:55.733889985 +0200
+++
/work/SRC/openSUSE:Factory/.perl-JSON-Validator.new.1899/perl-JSON-Validator.changes
2021-09-14 21:14:13.976395801 +0200
@@ -1,0 +2,13 @@
+Sun Aug 29 03:06:41 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 4.23
+ see /usr/share/doc/packages/perl-JSON-Validator/Changes
+
+ 4.23 2021-08-28T16:44:05+0200
+ - Fix mishandling of nullable combined witn enum in OpenAPIv3 #256 #257
+
+ 4.22 2021-08-27T13:12:56+0200
+ - Fix email checking #258
+ Contributor: Stephan Hradek
+
+-------------------------------------------------------------------
Old:
----
JSON-Validator-4.21.tar.gz
New:
----
JSON-Validator-4.23.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-JSON-Validator.spec ++++++
--- /var/tmp/diff_new_pack.ioejSK/_old 2021-09-14 21:14:14.508396323 +0200
+++ /var/tmp/diff_new_pack.ioejSK/_new 2021-09-14 21:14:14.512396327 +0200
@@ -18,7 +18,7 @@
%define cpan_name JSON-Validator
Name: perl-JSON-Validator
-Version: 4.21
+Version: 4.23
Release: 0
Summary: Validate data against a JSON schema
License: Artistic-2.0
@@ -46,6 +46,7 @@
%prep
%autosetup -n %{cpan_name}-%{version}
+find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor
++++++ JSON-Validator-4.21.tar.gz -> JSON-Validator-4.23.tar.gz ++++++
Binary files old/JSON-Validator-4.21/.pls_cache/index and
new/JSON-Validator-4.23/.pls_cache/index differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/Changes
new/JSON-Validator-4.23/Changes
--- old/JSON-Validator-4.21/Changes 2021-07-10 08:58:47.000000000 +0200
+++ new/JSON-Validator-4.23/Changes 2021-08-28 16:44:05.000000000 +0200
@@ -1,5 +1,12 @@
Revision history for perl distribution JSON-Validator
+4.23 2021-08-28T16:44:05+0200
+ - Fix mishandling of nullable combined witn enum in OpenAPIv3 #256 #257
+
+4.22 2021-08-27T13:12:56+0200
+ - Fix email checking #258
+ Contributor: Stephan Hradek
+
4.21 2021-07-10T15:58:47+0900
- Fix no warnings when negotiating */* #252
- Depends on perl v5.16.0 #250
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/MANIFEST
new/JSON-Validator-4.23/MANIFEST
--- old/JSON-Validator-4.21/MANIFEST 2021-07-10 08:58:48.000000000 +0200
+++ new/JSON-Validator-4.23/MANIFEST 2021-08-28 16:44:06.000000000 +0200
@@ -1,3 +1,4 @@
+.pls_cache/index
Changes
CONTRIBUTING.md
lib/JSON/Validator.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/META.json
new/JSON-Validator-4.23/META.json
--- old/JSON-Validator-4.21/META.json 2021-07-10 08:58:48.000000000 +0200
+++ new/JSON-Validator-4.23/META.json 2021-08-28 16:44:06.000000000 +0200
@@ -63,6 +63,6 @@
},
"x_IRC" : "ircs://irc.libera.chat:6697/#perl-openapi"
},
- "version" : "4.21",
+ "version" : "4.23",
"x_serialization_backend" : "JSON::PP version 4.06"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/META.yml
new/JSON-Validator-4.23/META.yml
--- old/JSON-Validator-4.21/META.yml 2021-07-10 08:58:48.000000000 +0200
+++ new/JSON-Validator-4.23/META.yml 2021-08-28 16:44:05.000000000 +0200
@@ -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.21'
+version: '4.23'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/lib/JSON/Validator/Formats.pm
new/JSON-Validator-4.23/lib/JSON/Validator/Formats.pm
--- old/JSON-Validator-4.21/lib/JSON/Validator/Formats.pm 2021-06-18
04:29:53.000000000 +0200
+++ new/JSON-Validator-4.23/lib/JSON/Validator/Formats.pm 2021-08-27
13:12:17.000000000 +0200
@@ -74,7 +74,7 @@
my $local_part = qr/(?:$dot_atom|$quoted_string)/o;
my $domain = qr/(?:$dot_atom|$domain_literal)/o;
- qr/$local_part\@$domain/o;
+ qr/^$local_part\@$domain$/o;
};
return $_[0] =~ $email_rfc5322_re ? undef : 'Does not match email format.';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/JSON-Validator-4.21/lib/JSON/Validator/Schema/OpenAPIv3.pm
new/JSON-Validator-4.23/lib/JSON/Validator/Schema/OpenAPIv3.pm
--- old/JSON-Validator-4.21/lib/JSON/Validator/Schema/OpenAPIv3.pm
2021-07-10 07:37:52.000000000 +0200
+++ new/JSON-Validator-4.23/lib/JSON/Validator/Schema/OpenAPIv3.pm
2021-08-28 16:43:12.000000000 +0200
@@ -298,6 +298,11 @@
return $_[2]->{nullable} && !defined $_[0] ? () :
$self->SUPER::_validate_type_boolean(@_);
}
+sub _validate_type_enum {
+ my $self = shift;
+ return $_[2]->{nullable} && !defined $_[0] ? () :
$self->SUPER::_validate_type_enum(@_);
+}
+
sub _validate_type_integer {
my $self = shift;
return $_[2]->{nullable} && !defined $_[0] ? () :
$self->SUPER::_validate_type_integer(@_);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/lib/JSON/Validator.pm
new/JSON-Validator-4.23/lib/JSON/Validator.pm
--- old/JSON-Validator-4.21/lib/JSON/Validator.pm 2021-07-10
08:58:47.000000000 +0200
+++ new/JSON-Validator-4.23/lib/JSON/Validator.pm 2021-08-28
16:44:05.000000000 +0200
@@ -12,7 +12,7 @@
use constant RECURSION_LIMIT => $ENV{JSON_VALIDATOR_RECURSION_LIMIT} || 100;
-our $VERSION = '4.21';
+our $VERSION = '4.23';
our %SCHEMAS = (
'http://json-schema.org/draft-04/schema#' => '+Draft4',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/t/jv-formats.t
new/JSON-Validator-4.23/t/jv-formats.t
--- old/JSON-Validator-4.21/t/jv-formats.t 2021-06-18 04:29:53.000000000
+0200
+++ new/JSON-Validator-4.23/t/jv-formats.t 2021-08-27 13:12:17.000000000
+0200
@@ -79,7 +79,9 @@
local $schema->{properties}{v}{format} = 'email';
validate_ok {v => '[email protected]'}, $schema;
validate_ok {v => 'foo'}, $schema, E('/v', 'Does not match
email format.');
- validate_ok {v => '??????@??????.??????'}, $schema, E('/v', 'Does
not match email format.');
+ validate_ok {v => '??????@??????.??????'}, $schema, E('/v',
'Does not match email format.');
+ validate_ok {v => 'wrong@[email protected]'}, $schema, E('/v', 'Does not
match email format.');
+ validate_ok {v => 'wrong [email protected]'}, $schema, E('/v', 'Does not
match email format.');
};
subtest 'float' => sub {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/JSON-Validator-4.21/t/openapiv3-nullable.t
new/JSON-Validator-4.23/t/openapiv3-nullable.t
--- old/JSON-Validator-4.21/t/openapiv3-nullable.t 2021-06-18
04:29:53.000000000 +0200
+++ new/JSON-Validator-4.23/t/openapiv3-nullable.t 2021-08-28
16:43:12.000000000 +0200
@@ -32,6 +32,11 @@
@errors = $schema->validate_response([get => '/test'], {body => \&body});
is "@errors", "", "nullable inside oneOf";
+$schema =
JSON::Validator->new->schema('data://main/nullable-with-enum.json')->schema;
+$body = {exists => 1, value => {name => undef}};
+@errors = $schema->validate_response([get => '/test'], {body => \&body});
+is "@errors", "", "nullable string with enum";
+
done_testing;
sub body {$body}
@@ -118,3 +123,35 @@
"name2": { "type": "integer" } }
}
}
+@@ nullable-with-enum.json
+{
+ "openapi": "3.0.0",
+ "info": { "title": "Nullable", "version": "" },
+ "paths": {
+ "/test": {
+ "get": {
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/components/schemas/name"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "name": { "type": "string", "nullable": "true", "enum": ["foo", "bar"] }
+ }
+ }
+}