Group
Extension

Matches 1

Dancer-Plugin-JSON-Schema ( P/PE/PERRETTDL/Dancer-Plugin-JSON-Schema-0.001.tar.gz, PERRETTDL, 2015; MetaCPAN )
Dancer-Plugin-JSON-Schema/lib/Dancer/Plugin/JSON/Schema.pm ( view source; MetaCPAN )
package Dancer::Plugin::JSON::Schema;

our $VERSION = '0.001'; # VERSION

use strict;
use warnings;
use utf8;
use Dancer::Plugin;
use JSON ();
use JSON::Schema;
use JSON::Hyper;
use Dancer qw(:syntax)
;

my $schemas = {};

sub json_schema {
  my ($self, $name) = plugin_args(@_);
  my $cfg = plugin_setting;

  if (not defined $name) {
    if (keys %$cfg == 1) {
      ($name) = keys %$cfg;
    } elsi
f (keys %$cfg) {
      $name = "default";
    } else {
      die "No JSON Schemas are configured";
    }
  }

  return $schemas->{$name} if $schemas->{$name};

  my $options = $cfg->{$name} or die "Th

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.