Async-Microservice
view release on metacpan or search on metacpan
Overriding Predefined Paths
The following paths are provided by default:
* / - Root index (OpenAPI documentation)
* /static/:filename - OpenAPI files
* /edit - OpenAPI editor
* /hcheck - Health check endpoint
You can override any of these default routes by defining them in your
get_routes() method. Your custom routes take precedence over the
defaults.
To bootstrap a new async service
Create a new package for your APIs using the current examples in
lib/Async/Microservice/*. Set the return value of service_name. This
string is used to set the process name and to locate the OpenAPI YAML
lib/Async/Microservice.pm view on Meta::CPAN
The following paths are provided by default:
=over 4
=item * C</> - Root index (OpenAPI documentation)
=item * C</static/:filename> - OpenAPI files
=item * C</edit> - OpenAPI editor
=item * C</hcheck> - Health check endpoint
=back
You can override any of these default routes by defining them in your
C<get_routes()> method. Your custom routes take precedence over the defaults.
=head2 To bootstrap a new async service
Create a new package for your APIs using the current examples in
C<lib/Async/Microservice/*>. Set the return value of C<service_name>.
root/static/async-microservice-time_openapi.yaml view on Meta::CPAN
properties:
epoch:
type: integer
example: 1586355387
405:
$ref: '#/components/responses/Method-Not-Allowed'
500:
$ref: '#/components/responses/Internal-Server-Error'
'/sleep':
get:
description: 'Sleep endpoint'
parameters:
- name: duration
in: query
description: sleep length in seconds
required: false
schema:
type: number
default: 'random number < 10 && > 0'
minimum: 0
maximum: 60
( run in 1.622 second using v1.01-cache-2.11-cpan-63c85eba8c4 )