Group
Extension

Matches 35358

Config-Structured ( T/TY/TYRRMINAL/Config-Structured-3.01.tar.gz, MTYRRELL, 2024; MetaCPAN )
Config-Structured/lib/Config/Structured/Deserializer.pm ( view source; MetaCPAN )
 Deserializes perl structures, JSON or YML data, from strings or files

use strict;
use warnings;

use File::Basename;
use IO::All;
use Readonly;

use JSON qw(decode_json);
use YAML::XS;

use Syntax::
 'yaml',
  json => 'json',
);
Readonly::Scalar my $DEFAULT_DECODER => q{perl};

sub decoders() {
  return (
    yaml => sub {
      Load(shift());
    },
    json => sub {
      decode_json(shift());
d

=encoding UTF-8

=head1 NAME

Config::Structured::Deserializer - Deserializes perl structures, JSON or YML data, from strings or files

=head1 VERSION

version 2.004

=head1 AUTHOR

Mark Tyrrell <m
OpenAPI-PerlGenerator ( C/CO/CORION/OpenAPI-PerlGenerator-0.02.tar.gz, CORION, 2024; MetaCPAN )
OpenAPI-PerlGenerator/scripts/openapi-codegen.pl ( view source; MetaCPAN )
ge main 0.01;
use 5.020;
use experimental 'signatures';
use Getopt::Long;
use Mojo::Template;
use JSON::Pointer;
use YAML::PP;

use OpenAPI::PerlGenerator;
use OpenAPI::PerlGenerator::Utils 'update_fi
 B< output > - name of the output directory

=item * B< api > - name of the OpenAPI file (YAML or JSON)

=item * B< tidy > - clean up the code using perltidy

=item * B< compile > - check that the gen
e //= 'openapi/openapi.yaml';
$output_directory //= '.';

my $schema = YAML::PP->new( boolean => 'JSON::PP' )->load_file( $api_file );

my %template = %OpenAPI::PerlGenerator::Template::Mojo::template
OpenAPI-PerlGenerator ( C/CO/CORION/OpenAPI-PerlGenerator-0.02.tar.gz, CORION, 2024; MetaCPAN )
OpenAPI-PerlGenerator/lib/OpenAPI/PerlGenerator.pm ( view source; MetaCPAN )
se JSON::Pointer;
use Markdown::Pod;

=head1 NAME

OpenAPI::PerlGenerator - create Perl client SDKs from OpenAPI specs

=head1 SYNOPSIS

  my $api_file = slurp( 'petshop.json' );
  my $schema = JSON::
ring => 'Str',
    number => 'Num',
    integer => 'Int',
    boolean => '', # a conflict between JSON::PP::Boolean and Type::Tiny
    object  => 'Object',
);

=item * B<typemap>

Hashref with the map
{ %default_typemap } },
);

sub fixup_json_ref( $root, $curr=$root ) {
    if( ref $curr eq 'ARRAY' ) {
        for my $c ($curr->@*) {
            $c = fixup_json_ref( $root, $c );
        }

    } e
marc-moose ( F/FR/FREDERICD/marc-moose-1.0.49.tar.gz, FREDERICD, 2024; MetaCPAN )
marc-moose/lib/MARC/Moose/Record.pm ( view source; MetaCPAN )
oose;

use Modern::Perl;
use Carp;
use MARC::Moose::Formater::Iso2709;
use MARC::Moose::Formater::Json;
use MARC::Moose::Formater::Legacy;
use MARC::Moose::Formater::Marcxml;
use MARC::Moose::Formater
cxmlSax;
use MARC::Moose::Parser::Legacy;
use MARC::Moose::Parser::Yaml;
use MARC::Moose::Parser::Json;

with 'MARC::Moose::Lint::Checker';

has lint => (
    is => 'rw',
);

has leader => (
    is   
  iso2709                  => MARC::Moose::Formater::Iso2709->new(),
    json                     => MARC::Moose::Formater::Json->new(),
    legacy                   => MARC::Moose::Formater::Legacy->
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Core/Iterator.pm ( view source; MetaCPAN )
Stancer::Exceptions::InvalidSearchStart;
use Stancer::Exceptions::InvalidSearchUntilCreation;
use JSON;
use Scalar::Util qw(blessed);
use Try::Tiny;

use Moo;
use namespace::clean;


sub _create_eleme
$json = decode_json $response;

                $more = $json->{range}->{has_more} == JSON::true;
                @elements = @{$json->{$class->_element_key}};

                $data->{start} += $json
Sah-SchemaBundle-Perl ( P/PE/PERLANCAR/Sah-SchemaBundle-Perl-0.050.tar.gz, PERLANCAR, 2024; MetaCPAN )
Sah-SchemaBundle-Perl/lib/Sah/SchemaR/perl/modargs.pm ( view source; MetaCPAN )
r\n    Foo::Bar=arg1,arg2\n\nSee also: `perl::modname`.\nA two-element array from (coercible from JSON string) is also allowed:\n\n    [\"Foo::Bar\", \\\@args]\n\n",examples=>[{valid=>0,value=>""},{va
"]]},{summary=>"Too many elements",valid=>0,value=>["Foo",["arg1","arg2"],{}]}],of=>[["array_from_json",{description=>"\nThese are valid values for this schema:\n\n    [\"Foo\"]                       
Sah-SchemaBundle-Perl ( P/PE/PERLANCAR/Sah-SchemaBundle-Perl-0.050.tar.gz, PERLANCAR, 2024; MetaCPAN )
Sah-SchemaBundle-Perl/lib/Sah/SchemaBundle/Perl.pm ( view source; MetaCPAN )
oo::Bar
 Foo::Bar=arg1,arg2

See also: C<perl::modname>.
A two-element array from (coercible from JSON string) is also allowed:

 ["Foo::Bar", \@args]


=item * L<perl::modname_with_optional_ver|Sah::
PDL-Algorithm-Center ( D/DJ/DJERIUS/PDL-Algorithm-Center-0.15.tar.gz, DJERIUS, 2024; MetaCPAN )
PDL-Algorithm-Center/lib/PDL/Algorithm/Center.pm ( view source; MetaCPAN )


























































































sub _to_json {
    my $obj = shift;

    require Data::Visitor::Tiny;
    require Data::Clone;
    require Sca
{ $_[1] } );
            ${ $_[1] }
              = defined( $object->can( 'TO_JSON' ) )
              ? $object->TO_JSON
              : $object->isa( 'PDL' ) ? $object->dims == 0
                  ?
 { TO_JSON => \&_to_json },
    },
    {
        -as      => '_return_iterate_results',
        -class   => 'PDL::Algorithm::Center::Iterate::Results',
        -methods => { TO_JSON => \&_to_json },
 
Sah-SchemaBundle-Perl ( P/PE/PERLANCAR/Sah-SchemaBundle-Perl-0.050.tar.gz, PERLANCAR, 2024; MetaCPAN )
Sah-SchemaBundle-Perl/lib/Sah/Schema/perl/modname_with_optional_args.pm ( view source; MetaCPAN )
pletion' => 'perl_modname',

    examples => \@examples_str,
}];

our $schema_array = [array_from_json => {
    summary => 'A 1- or 2-element array containing Perl module name (e.g. ["Foo::Bar"]) with
::Bar
    Foo::Bar=arg1,arg2

See also: `perl::modname`.
A two-element array from (coercible from JSON string) is also allowed:

    ["Foo::Bar", \@args]

_
    of => [
        $schema_array,
        
 with optional arguments (e.g. Foo::Bar=arg1,arg2)",
     "of" => [
       [
         "array_from_json",
         {
           summary     => "A 1- or 2-element array containing Perl module name (e.g.
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Core/Object.pm ( view source; MetaCPAN )
;
use Stancer::Core::Request;
use List::MoreUtils qw(any first_index);
use Log::Any qw($log);
use JSON;
use Scalar::Util qw(blessed);
use Storable qw(dclone);

use Moo;
use namespace::clean;


around 


has _integer => (
    is => 'ro',
    isa => ArrayRef[Str],
    default => sub{ [] },
);


has _json_ignore => (
    is => 'ro',
    isa => ArrayRef[Str],
    default => sub{ [qw(endpoint created po
 $data = Stancer::Core::Request->new->del($this);

    if ($data) {
        $this->hydrate(decode_json $data);
    }

    my @parts = split m/::/sm, ref $this;
    my $class = $parts[-1];

    $log->i
Dancer2-Plugin-OpenAPI ( Y/YA/YANICK/Dancer2-Plugin-OpenAPI-1.0.2.tar.gz, YANICK, 2024; MetaCPAN )
Dancer2-Plugin-OpenAPI/lib/Dancer2/Plugin/OpenAPI/Path.pm ( view source; MetaCPAN )
_ro';

use Carp;
use Hash::Merge;
use Clone 'clone';
use List::AllUtils qw/ first any none /;
use JSON;
use Class::Load qw/ load_class /;

has route => ( handles => [ 'pattern' ] );

has tags => ( pre
 ", ref $serializer
                    if none { $serializer->isa($_) } qw/ Dancer2::Serializer::JSON Dancer2::Serializer::YAML /;
                $r->{examples}{$serializer->content_type} = $example
definitions},
        properties => { response => $schema },
    };

    my $result = load_class('JSON::Schema::AsType')->new( schema => $schema)->validate_explain({ response => $data });

    return 
Dancer2-Plugin-JobScheduler ( M/MI/MIKKOI/Dancer2-Plugin-JobScheduler-0.006.tar.gz, MIKKOI, 2024; MetaCPAN )
Dancer2-Plugin-JobScheduler/lib/Dancer2/Plugin/JobScheduler.pm ( view source; MetaCPAN )
 \%plugin_config,
        };
    }
    use Dancer2::Plugin::JobScheduler;

    set serializer => 'JSON';

    get q{/submit_job} => sub {
        my %r = submit_job(
            client => 'theschwartz
 'My Name', age => 123 },
                opts => {},
            },
        );
        return to_json(\%r);
    };

    get q{/list_jobs} => sub {
        my %r = list_jobs(
            client => 'th
  search_params => {
                task => 'task1',
            },
        );
        return to_json(\%r);
    };

=head1 DESCRIPTION

Dancer2::Plugin::JobScheduler is an interface to access differe
Dancer2-Plugin-OpenAPI ( Y/YA/YANICK/Dancer2-Plugin-OpenAPI-1.0.2.tar.gz, YANICK, 2024; MetaCPAN )
Dancer2-Plugin-OpenAPI/lib/Dancer2/Plugin/OpenAPI.pm ( view source; MetaCPAN )
ide send_error ? 
# TODO: add 'validate_schema'
# TODO: add 'strict_schema'
# TODO: make /swagger.json configurable

package Dancer2::Plugin::OpenAPI;
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: creat
 /^qr/ ? eval $_ : $_ }
        @{ $_[0]->config->{auto_discover_skip} || [
            '/openapi.json', ( 'qr!' . $_[0]->ui_url . '!' ) x $_[0]->show_ui
        ] }
    ];
    },
);

has validate_res
 url configurable
    $self->app->add_route(
        method => 'get',
        regexp => '/openapi.json',
        code => sub { $self->doc },
    );

    if ( $self->show_ui ) {
        my $base_url = 
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Sepa.pm ( view source; MetaCPAN )
   default => sub{ [qw(date_birth)] },
);

has '+endpoint' => (
    default => 'sepa',
);

has '+_json_ignore' => (
    default => sub{ [qw(check endpoint created populated country last4)] },
);


has
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Core/Request.pm ( view source; MetaCPAN )

use Stancer::Config;
use Stancer::Core::Request::Call;
use Stancer::Exceptions::Http;
use JSON qw(decode_json);
use Log::Any qw($log);
use Try::Tiny;

use Moo;
use namespace::clean;


sub del {
    m
;

    my $request = HTTP::Request->new(PATCH => $object->uri);

    $request->content($object->toJSON());

    return $this->_request($request, $object);
}


sub post {
    my $this = shift;
    my $
t;

    my $request = HTTP::Request->new(POST => $object->uri);

    $request->content($object->toJSON());

    return $this->_request($request, $object);
}

sub _clean_request {
    my $this = shift;
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Payment.pm ( view source; MetaCPAN )
re)] },
);

has '+_inner_objects' => (
    default => sub{ [qw(card customer sepa)] },
);

has '+_json_ignore' => (
    default => sub{ [qw(endpoint created populated method refunds)] },
);

has '+end
Sah-SchemaBundle-BorderStyle ( P/PE/PERLANCAR/Sah-SchemaBundle-BorderStyle-0.003.tar.gz, PERLANCAR, 2024; MetaCPAN )
Sah-SchemaBundle-BorderStyle/lib/Sah/SchemaR/perl/borderstyle/modname_with_optional_args.pm ( view source; MetaCPAN )
 '0.003'; # VERSION

our $rschema = do{my$var={base=>"any",clsets_after_base=>[{of=>[["array_from_json",{elems=>[["str",{match=>"\\A(?:[A-Za-z_][A-Za-z_0-9]*(::[A-Za-z_0-9]+)*(?:=.*)?)\\z","x.completi
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Card.pm ( view source; MetaCPAN )
t => 'cards',
);

has '+_integer' => (
    default => sub{ [qw(exp_month exp_year)] },
);

has '+_json_ignore' => (
    default => sub{ [qw(endpoint created populated brand country last4)] },
);


has
Sah-SchemaBundle-ArrayData ( P/PE/PERLANCAR/Sah-SchemaBundle-ArrayData-0.005.tar.gz, PERLANCAR, 2024; MetaCPAN )
Sah-SchemaBundle-ArrayData/lib/Sah/SchemaR/perl/arraydata/modname_with_optional_args.pm ( view source; MetaCPAN )
 '0.005'; # VERSION

our $rschema = do{my$var={base=>"any",clsets_after_base=>[{of=>[["array_from_json",{elems=>[["str",{match=>"\\A(?:[A-Za-z_][A-Za-z_0-9]*(::[A-Za-z_0-9]+)*(?:=.*)?)\\z","x.completi
Stancer ( J/JD/JDASILVA/Stancer-1.0.3.tar.gz, JDASILVA, 2024; MetaCPAN )
Stancer/lib/Stancer/Sepa/Check.pm ( view source; MetaCPAN )
> 1,
);

sub TO_JSON {
    my $self = shift;

    return {} unless defined $self->sepa;
    return { id => $self->sepa->id } if defined $self->sepa->id;
    return $self->sepa->TO_JSON();
}

1;

__END

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