Async-Microservice
view release on metacpan or search on metacpan
root/static/async-microservice-time_openapi.yaml view on Meta::CPAN
500:
$ref: '#/components/responses/Internal-Server-Error'
'/datetime/span/{s_date}':
get:
description: 'Returns time span between now and start date + years period in different units'
parameters:
- name: s_date
in: path
description: start date in format YYYYMMDD or "now"
required: true
schema:
type: string
example: 20010924
- name: r_age
in: query
description: date span in years
required: false
schema:
type: number
default: 65
minimum: 1
maximum: 200
- name: m_income
in: query
description: monthly increase to sum up
required: false
schema:
type: number
minimum: 1
responses:
200:
description: 'weeks left'
content:
'application/json':
schema:
$ref: '#/components/schemas/Detailed-Weeks-Left'
405:
$ref: '#/components/responses/Input-Processing-Error'
500:
$ref: '#/components/responses/Internal-Server-Error'
'/epoch':
get:
description: 'Get the number of seconds since 1970-01-01T00:00:00'
responses:
200:
description: 'epoch seconds'
content:
'application/json':
schema:
type: object
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
exclusiveMinimum: true
responses:
200:
description: 'Return OK after sleep time'
content:
'application/json':
schema:
type: object
properties:
duration:
type: number
example: 3.23
start:
type: number
example: 1586453521.4604
stop:
type: number
example: 1586453524.69395
405:
$ref: '#/components/responses/Input-Processing-Error'
500:
$ref: '#/components/responses/Internal-Server-Error'
'/hcheck':
get:
description: 'Returns a 200 response and Perl package name as text when the service is available'
responses:
200:
description: 'healthy'
content:
'text/plain':
example: 'Async::Microservice::Time'
'application/json':
example: '{"data": "Service-name: async-microservice-time\nAPI-version: 1\nOK\n"}'
405:
$ref: '#/components/responses/Method-Not-Allowed'
503:
description: 'unhealthy'
content:
'text/plain':
example: 'shutting down'
'application/json':
example: '{"data": "shutting down"}'
components:
responses:
'Method-Not-Allowed':
description: 'Method not allowed for this route.'
headers:
Allow:
description: 'Comma-separated list of allowed HTTP methods for the route.'
schema:
( run in 0.545 second using v1.01-cache-2.11-cpan-524268b4103 )