Group
Extension

Matches 35358

Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Plugin/Auth/Token.pm ( view source; MetaCPAN )
ncy/auth/unauthorized',
            status => 401,
        );
        $c->respond_to(
            json => {},
            html => {},
        );
        return undef;
    };
}

1;

__END__

=pod

=hea
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Controller/Yancy.pm ( view source; MetaCPAN )
handlers also gives you a built-in JSON API for your
#pod website. Any user agent that requests JSON will get JSON instead of
#pod HTML. For full details on how JSON clients are detected, see
#pod L<M
ALSO
#pod
#pod L<Yancy>
#pod
#pod =cut

use Mojo::Base 'Mojolicious::Controller';
use Mojo::JSON qw( to_json );
use Yancy::Util qw( derp is_type );
use POSIX qw( ceil );

#pod =method schema
#pod
#pod
words).
#pod
#pod =cut

sub clean_item {
  my ( $self, $item ) = @_;
  my $props = $self->schema->json_schema->{properties};
  my @keep_props = grep { !$props->{$_} || ($props->{$_}{format}//'') ne 'p
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Plugin/Auth/Password.pm ( view source; MetaCPAN )
hen the user is not logged
#pod in.
#pod
#pod =head2 yancy/auth/unauthorized.json.ep
#pod
#pod This template renders a JSON object with an "errors" array explaining
#pod the error.
#pod
#pod =head2 la
ost-often appears when the user is not logged
in.

=head2 yancy/auth/unauthorized.json.ep

This template renders a JSON object with an "errors" array explaining
the error.

=head2 layouts/yancy/auth.h
Dancer2-Session-DatabasePlugin ( A/AK/AKALINUX/Dancer2-Session-DatabasePlugin-1.0014.tar.gz, AKALINUX, 2021; MetaCPAN )
Dancer2-Session-DatabasePlugin/lib/Dancer2/Session/DatabasePlugin.pm ( view source; MetaCPAN )
 add the following code.

  use JSON qw(to_json from_jsom);

  $Dancer2::Session::DatabasePlugin::FREEZE=\&to_json;
  $Dancer2::Session::DatabasePlugin::THAW=\&from_json;

  $Dancer2::Session::Databas
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Mojolicious/Plugin/Yancy.pm ( view source; MetaCPAN )
eeded. If validation fails, this helper will throw an
#pod exception with an array reference of L<JSON::Validator::Error> objects.
#pod See L<the validate helper|/yancy.validate> and L<the filter appl
/comment/:id' => sub {
#pod         eval { $c->yancy->set( "comment", $c->stash( 'id' ), $c->req->json ) };
#pod         if ( $@ ) {
#pod             return $c->render( status => 400, errors => $@ );
eeded. If validation fails, this helper will throw an
#pod exception with an array reference of L<JSON::Validator::Error> objects.
#pod See L<the validate helper|/yancy.validate> and L<the filter appl
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Controller/Yancy/API.pm ( view source; MetaCPAN )
ojolicious::Controller>
#pod
#pod =cut

use Mojo::Base 'Mojolicious::Controller';
use Mojo::JSON qw( to_json );
use Yancy::Util qw( derp );

#pod =method list
#pod
#pod List the items in a schema. The
-not_bool' } = $key;
        }
        else {
            die "Sorry type '" .
                to_json( $type ) .
                "' is not handled yet, only string|number|integer|boolean is supported
tem is extracted from the OpenAPI input, under parameter name
#pod C<newItem>, and must be a hash/JSON "object". It will be filtered by
#pod filters conforming with L<Mojolicious::Plugin::Yancy/yancy.
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Backend/Dbic.pm ( view source; MetaCPAN )
 exists,
#pod that will be called, and must return the initial JSON schema for Yancy.
#pod
#pod A very useful possibility is for that JSON schema to just contain
#pod C<<{ 'x-ignore' => 1 }>>.
#pod
#p
lar::Util qw( looks_like_number blessed );
use Mojo::Loader qw( load_class );
use Mojo::JSON qw( true encode_json );


BEGIN {
    eval { require DBIx::Class; DBIx::Class->VERSION( 0.082842 ); 1 }
   
$self->normalize( $schema_name, $params );
    die "No refs allowed in '$schema_name': " . encode_json $params
        if grep ref && ref ne 'SCALAR', values %$params;
    my $created = $self->driver-
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Backend/MojoDB.pm ( view source; MetaCPAN )
nd';
use Role::Tiny 'with';
use Scalar::Util qw( blessed looks_like_number );
use Mojo::JSON qw( true encode_json );
use Carp qw( croak );
use Yancy::Util qw( is_type is_format );

with 'Yancy::Backen
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Plugin/Auth/Github.pm ( view source; MetaCPAN )
oken', $token ) },
    )
    ->then( sub {
        my ( $tx ) = @_;
        my $login = $tx->res->json( '/login' );
        if ( !$login ) {
            $c->render( text => 'Error getting Github login
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Guides/Schema.pod ( view source; MetaCPAN )
mas are configured using L<JSON Schema|http://json-schema.org>.
The JSON Schema defines what fields (properties) an item has, and what
type of data those field have. The JSON Schema also can define
co
even an C<example> value. For more information on
what can be defined, see L<the docs on JSON Schema|http://json-schema.org>.

=head2 Yancy Generated Schema

By default, Yancy will read your database 
ger C<id> and two
strings, C<name> (not nullable) and C<email> (nullable)), Yancy will
generate a JSON schema that looks like this:

    schema => {
        people => {
            required => [ 'name
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Guides/Tutorial.pod ( view source; MetaCPAN )
scans your database to determine what kind of data is inside, but
Yancy also accepts a L<JSON Schema|http://json-schema.org> to add more
information about your data. You can add descriptions, examples
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Model/Item.pm ( view source; MetaCPAN )
 !$self->isa( scalar caller ) ) {
        return $self->{data};
    }
    return $self;
}

sub TO_JSON {
    my ( $self ) = @_;
    return $self->{data};
}

#pod =attr schema
#pod
#pod The L<Yancy::Mo
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Guides/Upgrading.pod ( view source; MetaCPAN )
en enhanced to support everything that
Yancy::Controller::Yancy::API could do (like searching and JSON in the
request body).

To get back to the old API, set C<editor.default_controller> to
'Yancy::Co
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Model/Schema.pm ( view source; MetaCPAN )
des::Model>, L<Yancy::Model>
#pod
#pod =cut

use Mojo::Base -base;
use Mojo::JSON qw( true false );
use Yancy::Util qw( json_validator is_type derp );

#pod =attr model
#pod
#pod The L<Yancy::Model> o
 => sub { die 'name is required' };

#pod =attr json_schema
#pod
#pod The JSON Schema for this schema.
#pod
#pod =cut

has json_schema => sub { die 'json_schema is required' };

sub _backend { shift->

sub new {
  my ( $class, @args ) = @_;
  my $self = $class->SUPER::new( @args );
  $self->_check_json_schema;
  return $self;
}

#pod =method id_field
#pod
#pod The ID field for this schema. Either a
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Controller/Yancy/MultiTenant.pm ( view source; MetaCPAN )
r_id';
        my $user_id = $c->stash( 'user_id' );
        if ( eval { $c->req->json } ) {
            $c->req->json->{ $user_id_field } = $user_id;
        }
        else {
            $c->req->par
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Backend/Memory.pm ( view source; MetaCPAN )
to Local::Test

use Mojo::Base '-base';
use List::Util qw( max );
use Mojo::JSON qw( true false from_json to_json encode_json );
use Mojo::File qw( path );
use Storable qw( dclone );
use Role::Tiny qw
path ) = $url =~ m{^[^:]+://[^/]+(?:/(.+))?$};
        if ( $path ) {
            %DATA = %{ from_json( path( ( $ENV{MOJO_HOME} || () ), $path )->slurp ) };
        }
    }
    $schema //= \%Local::Te
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Backend/Pg.pm ( view source; MetaCPAN )
 L<Mojo::Pg>, L<Yancy>
#pod
#pod =cut

use Mojo::Base 'Yancy::Backend::MojoDB';
use Mojo::JSON qw( encode_json );
use Scalar::Util qw( blessed );
BEGIN {
    eval { require Mojo::Pg; Mojo::Pg->VERSION
Group-Git ( I/IV/IVANWILLS/Group-Git-v0.7.7.tar.gz, IVANWILLS, 2021; MetaCPAN )
Group-Git/lib/Group/Git/Stash.pm ( view source; MetaCPAN )
s;
use version;
use Carp;
use English qw/ -no_match_vars /;
use IO::Prompt qw/prompt/;
use JSON qw/decode_json/;
use WWW::Mechanize;
use Path::Tiny;

our $VERSION = version->new('0.7.7');

extends 'Gr
tus, ") accessing $url$start\n";
            last;
        }
        my $response = eval { decode_json $mech->content };
        if ( !$response ) {
            die $@ || "Error occured processing sta
Group-Git ( I/IV/IVANWILLS/Group-Git-v0.7.7.tar.gz, IVANWILLS, 2021; MetaCPAN )
Group-Git/lib/Group/Git/Bitbucket.pm ( view source; MetaCPAN )
s;
use version;
use Carp;
use English qw/ -no_match_vars /;
use IO::Prompt qw/prompt/;
use JSON qw/decode_json/;
use WWW::Mechanize;
use Path::Tiny;

our $VERSION = version->new('0.7.7');

extends 'Gr
cket.org/1.0/user/repositories";
    @ARGV = @argv;

    $mech->get($url);
    my $repos = decode_json $mech->content;
    for my $repo ( @$repos ) {
        $repos{$repo->{name}} = Group::Git::Repo->
Yancy ( P/PR/PREACTION/Yancy-1.088.tar.gz, PREACTION, 2021; MetaCPAN )
Yancy/lib/Yancy/Plugin/Auth/Basic.pm ( view source; MetaCPAN )
horized result
        if ( grep { $_ eq 'api' } @{ $c->req->url->path } ) {
            # Render JSON unauthorized response
            $c->render(
                handler => 'openapi', # XXX This st

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