Dancer2-Plugin-OpenAPI
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
responses => {
default => { description => 'The judge information' }
},
},
get '/judge/:judge_name' => { ... };
```
If the key `example` is given (instead of `examples` as defined by the OpenAPI specs),
and the serializer used by the application is [Dancer2::Serializer::JSON](https://metacpan.org/pod/Dancer2%3A%3ASerializer%3A%3AJSON) or [Dancer2::Serializer::YAML](https://metacpan.org/pod/Dancer2%3A%3ASerializer%3A%3AYAML),
the example will be expanded to have the right content-type key.
```perl
openapi_path {
responses => {
default => { example => { fullname => 'Mary Ann Murphy' } }
},
},
get '/judge/:judge_name' => { ... };
# equivalent to
lib/Dancer2/Plugin/OpenAPI.pm view on Meta::CPAN
openapi_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 OpenAPI specs),
and the serializer used by the application is L<Dancer2::Serializer::JSON> or L<Dancer2::Serializer::YAML>,
the example will be expanded to have the right content-type key.
openapi_path {
responses => {
default => { example => { fullname => 'Mary Ann Murphy' } }
},
},
get '/judge/:judge_name' => { ... };
# equivalent to
( run in 2.011 seconds using v1.01-cache-2.11-cpan-524268b4103 )