Created
September 4, 2019 18:25
-
-
Save smurphy8/933c83e1fccdc199f8479742e24a2148 to your computer and use it in GitHub Desktop.
Kiosk API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "1.0", | |
"title": "Mock Kiosk Server API", | |
"license": { | |
"name": "Private License" | |
}, | |
"description": "This is the mock kiosk server API. It is intended for client development use. All routes, unless otherwise specified, will be available in the production version." | |
}, | |
"paths": { | |
"/kiosk/lanes": { | |
"get": { | |
"produces": [ | |
"application/json;charset=utf-8" | |
], | |
"responses": { | |
"200": { | |
"schema": { | |
"items": { | |
"$ref": "#/definitions/Lane" | |
}, | |
"type": "array" | |
}, | |
"description": "" | |
} | |
} | |
} | |
}, | |
"/kiosk/lane/{lane-number}": { | |
"get": { | |
"produces": [ | |
"application/json;charset=utf-8" | |
], | |
"parameters": [ | |
{ | |
"maximum": 1.8446744073709552e+19, | |
"minimum": 0, | |
"required": true, | |
"in": "path", | |
"name": "lane-number", | |
"type": "integer" | |
} | |
], | |
"responses": { | |
"404": { | |
"description": "`lane-number` not found" | |
}, | |
"200": { | |
"schema": { | |
"$ref": "#/definitions/Lane" | |
}, | |
"description": "" | |
} | |
} | |
} | |
}, | |
"/kiosk/lane/v2": { | |
"post": { | |
"consumes": [ | |
"application/json;charset=utf-8" | |
], | |
"produces": [ | |
"application/json;charset=utf-8" | |
], | |
"parameters": [ | |
{ | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/TicketRequest" | |
}, | |
"in": "body", | |
"name": "body" | |
} | |
], | |
"responses": { | |
"400": { | |
"description": "Invalid `body`" | |
}, | |
"204": { | |
"description": "" | |
} | |
} | |
} | |
}, | |
"/kiosk/handshake": { | |
"get": { | |
"produces": [ | |
"application/json;charset=utf-8" | |
], | |
"responses": { | |
"200": { | |
"schema": { | |
"type": "string" | |
}, | |
"description": "" | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Lane": { | |
"description": "A lane type has a lane number and a lane status.", | |
"required": [ | |
"laneNumber", | |
"laneStatus" | |
], | |
"properties": { | |
"laneNumber": { | |
"maximum": 1.8446744073709552e+19, | |
"minimum": 0, | |
"type": "integer" | |
}, | |
"laneStatus": { | |
"$ref": "#/definitions/LaneStatus" | |
} | |
}, | |
"example": { | |
"status": "Available", | |
"lane": 1 | |
}, | |
"type": "object" | |
}, | |
"LaneStatus": { | |
"description": "A lane status is one of four values: {\"status\":\"Available\"}, {\"status\":\"WaitingToStart\"}, {\"status\":\"Pumping\"} or {\"status\":\"Disabled\", \"message\": \"disabled reason\"}", | |
"properties": { | |
"Available": { | |
"example": [], | |
"items": null, | |
"maxItems": 0, | |
"type": "array" | |
}, | |
"WaitingToStart": { | |
"example": [], | |
"items": null, | |
"maxItems": 0, | |
"type": "array" | |
}, | |
"Pumping": { | |
"example": [], | |
"items": null, | |
"maxItems": 0, | |
"type": "array" | |
}, | |
"Disabled": { | |
"type": "string" | |
} | |
}, | |
"example": "WaitingToStart", | |
"maxProperties": 1, | |
"minProperties": 1, | |
"type": "object" | |
}, | |
"UTCTime": { | |
"example": "2016-07-22T00:00:00Z", | |
"format": "yyyy-mm-ddThh:MM:ssZ", | |
"type": "string" | |
}, | |
"UUID": { | |
"example": "00000000-0000-0000-0000-000000000000", | |
"format": "uuid", | |
"type": "string" | |
}, | |
"TicketRequest": { | |
"required": [ | |
"ticketRequestLaneNumber", | |
"ticketRequestTicketNumber", | |
"ticketRequestUser", | |
"ticketRequestSourceOfWater", | |
"ticketRequestNumberOfBarrels", | |
"ticketRequestCompanyName", | |
"ticketRequestLeaseName" | |
], | |
"properties": { | |
"ticketRequestLaneNumber": { | |
"maximum": 1.8446744073709552e+19, | |
"minimum": 0, | |
"type": "integer" | |
}, | |
"ticketRequestTicketNumber": { | |
"type": "string" | |
}, | |
"ticketRequestUser": { | |
"type": "string" | |
}, | |
"ticketRequestSourceOfWater": { | |
"$ref": "#/definitions/TicketSourceOfWater" | |
}, | |
"ticketRequestNumberOfBarrels": { | |
"maximum": 9.223372036854776e+18, | |
"minimum": -9.223372036854776e+18, | |
"type": "integer" | |
}, | |
"ticketRequestCompanyName": { | |
"type": "string" | |
}, | |
"ticketRequestLeaseName": { | |
"type": "string" | |
} | |
}, | |
"type": "object" | |
}, | |
"TicketSourceOfWater": { | |
"type": "string", | |
"enum": [ | |
"LeaseWater", | |
"FlowbackWater" | |
] | |
}, | |
"TicketStatus": { | |
"description": "A TicketStatus is one of three values: {\"tag\": \"TicketAborted\", \"contents\": \"reason ticket was aborted\"}, {\"tag\": \"TicketStarted\", \"contents\": {\"ticketPumpStartTime\": \"2019-01-01T00:00:27Z\", \"reasonUnfinished\": \"timed out waiting for Available status\"}}, {\"tag\": \"TicketCompleted\", \"contents\": {\"ticketPumpStartTime\": \"2019-01-01T00:00:27Z\", \"ticketPumpEndTime\": \"2019-01-01T00:07:27Z\"}}", | |
"properties": { | |
"TicketAborted": { | |
"type": "string" | |
}, | |
"TicketStarted": { | |
"$ref": "#/definitions/StartedTicketStatus" | |
}, | |
"TicketCompleted": { | |
"$ref": "#/definitions/CompletedTicketStatus" | |
} | |
}, | |
"example": { | |
"tag": "TicketCompleted", | |
"contents": { | |
"ticketPumpEndTime": "2019-02-01T00:00:13Z", | |
"ticketPumpStartTime": "2019-02-01T00:00:12Z" | |
} | |
}, | |
"maxProperties": 1, | |
"minProperties": 1, | |
"type": "object" | |
}, | |
"StartedTicketStatus": { | |
"description": "A StartedTicketStatus is an object that exists inside of a TicketStatus and contains the starting pump time and the a text description of why the ticket was never completed", | |
"required": [ | |
"ticketPumpStartTimeOnly", | |
"ticketPumpNotFinishedNote" | |
], | |
"properties": { | |
"ticketPumpStartTimeOnly": { | |
"$ref": "#/definitions/PlowUTCTime" | |
}, | |
"ticketPumpNotFinishedNote": { | |
"type": "string" | |
} | |
}, | |
"example": { | |
"reasonUnfinished": "timed out waiting for Available status", | |
"ticketPumpStartTime": "2019-02-01T00:00:12Z" | |
}, | |
"type": "object" | |
}, | |
"PlowUTCTime": { | |
"example": "2016-07-22T00:00:00Z", | |
"format": "yyyy-mm-ddThh:MM:ssZ", | |
"type": "string" | |
}, | |
"CompletedTicketStatus": { | |
"description": "A CompletedTicketStatus is an object that exists inside of a TicketStatus and contains the starting pump time and ending pump time", | |
"required": [ | |
"ticketPumpStartTime", | |
"ticketPumpEndTime" | |
], | |
"properties": { | |
"ticketPumpStartTime": { | |
"$ref": "#/definitions/PlowUTCTime" | |
}, | |
"ticketPumpEndTime": { | |
"$ref": "#/definitions/PlowUTCTime" | |
} | |
}, | |
"example": { | |
"ticketPumpEndTime": "2019-02-01T00:00:13Z", | |
"ticketPumpStartTime": "2019-02-01T00:00:12Z" | |
}, | |
"type": "object" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment