ADD The API that the server will support.
This commit is contained in:
parent
7d5d030960
commit
5ddc7c6a79
85
swagger.yml
85
swagger.yml
|
@ -16,3 +16,88 @@ produces:
|
|||
schemes:
|
||||
- http
|
||||
swagger: "2.0"
|
||||
|
||||
# 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
|
||||
format: int64
|
||||
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:
|
||||
- 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"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue