File: load-http.t

package info (click to toggle)
libjson-validator-perl 0.92%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 408 kB
  • ctags: 89
  • sloc: perl: 1,009; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 457 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use Mojo::Base -strict;
use Test::More;
use JSON::Validator;

plan skip_all => 'TEST_ONLINE=1' unless $ENV{TEST_ONLINE};

my $validator = JSON::Validator->new;

$validator->schema('http://swagger.io/v2/schema.json');

isa_ok($validator->schema, 'Mojo::JSON::Pointer');
like $validator->schema->get('/title'), qr{swagger}i, 'got swagger spec';
ok $validator->schema->get('/patternProperties/^x-/description'), 'resolved vendorExtension $ref';

done_testing;