Dancer-Plugin-Swagger

 view release on metacpan or  search on metacpan

README.mkdn  view on Meta::CPAN

    swagger_path {
        responses => {
            default => { description => 'The judge information' }
        },
    },
    get '/judge/:judge_name' => { ... };
    ```

    If the key `example` is given (instead of `examples` as defined by the Swagger specs), 
    and the serializer used by the application is [Dancer::Serializer::JSON](https://metacpan.org/pod/Dancer::Serializer::JSON) or [Dancer::Serializer::YAML](https://metacpan.org/pod/Dancer::Serializer::YAML),
    the example will be expanded to have the right content-type key.

    ```perl
    swagger_path {
        responses => {
            default => { example => { fullname => 'Mary Ann Murphy' } }
        },
    },
    get '/judge/:judge_name' => { ... };

    # equivalent to

lib/Dancer/Plugin/Swagger.pm  view on Meta::CPAN


    swagger_path {
        responses => {
            default => { description => 'The judge information' }
        },
    },
    get '/judge/:judge_name' => { ... };

If the key C<example> is given (instead of C<examples> as defined by the Swagger specs), 
and the serializer used by the application is L<Dancer::Serializer::JSON> or L<Dancer::Serializer::YAML>,
the example will be expanded to have the right content-type key.

    swagger_path {
        responses => {
            default => { example => { fullname => 'Mary Ann Murphy' } }
        },
    },
    get '/judge/:judge_name' => { ... };

    # equivalent to



( run in 0.893 second using v1.01-cache-2.11-cpan-524268b4103 )