Group
Extension

Matches 2

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 = 
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 

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