Group
Extension

JSON-Schema-Generator/lib/JSON/Schema/Generator/Handler/Atom.pm

package JSON::Schema::Generator::Handler::Atom;

use strict;
use warnings;

sub process {
  my ($class, $atom_type, $examples, $dispatch) = @_;
  return +{
    type => $atom_type->name,
    ($atom_type->isa('JSON::TypeInference::Type::Unknown') ? () : (example => $examples->[0])),
  };
}

1;


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