2018-03-28 18:33:41 +00:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
info:
|
|
|
|
contact:
|
|
|
|
email: elf.sternberg@gmail.com
|
|
|
|
name: Elf Sternberg
|
|
|
|
url: https://github.com/elfsternberg/go-timeofday
|
|
|
|
description: Return the time of day. Timezone optional.
|
|
|
|
license:
|
|
|
|
name: apache-2.0
|
|
|
|
title: timeofday
|
|
|
|
version: 0.1.0
|
|
|
|
paths: {}
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
schemes:
|
|
|
|
- http
|
|
|
|
swagger: "2.0"
|
2018-03-28 19:20:20 +00:00
|
|
|
|
|
|
|
# Everything above this line was generated by the swagger command.
|
|
|
|
# Everything below this line has to be added by hand.
|
|
|
|
|
|
|
|
basePath: /timeofday/v1
|
|
|
|
|
|
|
|
definitions:
|
|
|
|
timezone:
|
|
|
|
type: object
|
|
|
|
required:
|
|
|
|
- timezone
|
|
|
|
properties:
|
|
|
|
timezone:
|
|
|
|
type: string
|
|
|
|
minLength: 3
|
|
|
|
default: "UTC"
|
|
|
|
|
|
|
|
timeofday:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
timeofday:
|
|
|
|
type: string
|
|
|
|
|
|
|
|
errorResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
code:
|
|
|
|
type: integer
|
2018-03-28 23:21:57 +00:00
|
|
|
format: int32
|
2018-03-28 19:20:20 +00:00
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- message
|
|
|
|
|
|
|
|
paths:
|
|
|
|
/time:
|
|
|
|
post:
|
|
|
|
description: "Returns time of day."
|
|
|
|
operationId: "ClockPost"
|
|
|
|
parameters:
|
|
|
|
- in: "body"
|
|
|
|
name: "timezone"
|
|
|
|
description: "Timezone to return"
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/timezone"
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: "Returns the time of day."
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/timeofday"
|
|
|
|
404:
|
|
|
|
description: "Time zone not found"
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/errorResponse"
|
|
|
|
500:
|
|
|
|
description: "Something has gone horribly wrong"
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/errorResponse"
|
|
|
|
|
|
|
|
get:
|
|
|
|
description: "Returns time of day."
|
|
|
|
operationId: "ClockGet"
|
|
|
|
parameters:
|
2018-03-28 23:21:57 +00:00
|
|
|
- in: query
|
|
|
|
name: timezone
|
2018-03-28 19:20:20 +00:00
|
|
|
description: "Timezone to return"
|
|
|
|
required: false
|
2018-03-28 23:21:57 +00:00
|
|
|
type: string
|
2018-03-28 19:20:20 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: "Returns the time of day."
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/timeofday"
|
|
|
|
404:
|
|
|
|
description: "Time zone not found"
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/errorResponse"
|
|
|
|
500:
|
|
|
|
description: "Something has gone horribly wrong"
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/errorResponse"
|
|
|
|
|
|
|
|
|