swagger: "2.0"
info:
description: ""
version: "1.0.0"
title: "Bangkok Transit Planner API"
schemes:
- "https"
- "http"
paths:
/stations:
get:
summary: Get all stations list
produces:
- application/json
responses:
200:
description: Get success
schema:
type: array
items:
$ref: "#/definitions/station"
500:
description: Server error
/routes:
get:
summary: Get all possible routes from station A to station B
produces:
- application/json
parameters:
- name: from
in: query
description: Starting station ID
type: number
format: int
required: true
- name: to
in: query
description: Ending station ID
type: number
format: int
required: true
responses:
200:
description: Get success
schema:
type: array
items:
$ref: "#/definitions/route"
500:
description: Server error
definitions:
station:
type: object
properties:
name:
type: string
id:
type: number
format: int
route:
type: object
properties:
cost:
type: number
stations:
type: array
items:
$ref: "#/definitions/station"