-
Notifications
You must be signed in to change notification settings - Fork 20
/
openapi.yaml
119 lines (115 loc) · 3.05 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
# OpenAPI Spec for the KongAir Routes service
openapi: 3.0.0
info:
description: KongAir Routes service provides the registered routes KongAir flies between origin and destination airports
version: 0.1.0
title: Routes Service
servers:
- url: https://api.kong-air.com
description: KongAir API Server
paths:
/health:
get:
summary: Health check endpoint for Kubernetes
description: Endpoint that returns the service health status.
responses:
'200':
description: Service is healthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: "OK"
'500':
description: Service is unhealthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: "unhealthy"
"/routes/{id}":
get:
summary: Request a specific KongAir route by id (LHR-SIN)
description: |
Returns a specific route from a given Route ID
tags:
- flight-data
operationId: get-route
parameters:
- name: id
in: path
description: String route ID
required: true
schema:
type: string
responses:
'200':
description: Successful response with the found Route
content:
application/json:
schema:
$ref: '#/components/schemas/Route'
'404':
description: Route not found
"/routes":
get:
summary: Request all the KongAir routes
description: |
Returns all the routes KongAir is currently registered to fly.
A Route is a pairing between origin and destination airport codes.
tags:
- flight-data
operationId: get-routes
parameters:
- name: origin
in: query
description: filter by origin
required: false
style: form
schema:
type: array
items:
type: string
responses:
'200':
description: Successful response with the registered Routes
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Route'
examples:
lhr-sfo:
value: |
[{
"id": "LHR-SFO",
"origin": "LHR",
"destination": "SFO",
"avg_duration": 660
}]
components:
schemas:
Route:
type: object
properties:
id:
type: string
origin:
type: string
destination:
type: string
avg_duration:
type: integer
required:
- id
- origin
- destination
- avg_duration