forked from arosenbach/KataTrainReservation
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathKataTrainApp.yaml
More file actions
155 lines (155 loc) · 3.57 KB
/
KataTrainApp.yaml
File metadata and controls
155 lines (155 loc) · 3.57 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
openapi: 3.0.0
info:
title: KataTrainApp
contact: {}
version: '1.0'
servers:
- url: http://localhost:8282
variables: {}
- url: http://localhost:8181
variables: {}
- url: http://localhost:9991/api
variables: {}
tags:
- name: "Booking"
description: "Booking service"
- name: "Reservations"
description: "Reservation API"
- name: "Data"
description: "Data service"
paths:
/booking_reference:
get:
tags:
- Booking
summary: Get booking reference
operationId: Getbookingreference
parameters: []
responses:
200:
description: ''
headers: {}
deprecated: false
servers:
- url: http://localhost:8282
variables: {}
/data_for_train/{trainId}:
get:
tags:
- Data
summary: Get train data
operationId: Gettraindata
parameters:
- name: trainId
in: path
description: ''
required: true
style: simple
schema:
type: string
example: express_2000
responses:
200:
description: ''
headers: {}
deprecated: false
servers:
- url: http://localhost:8181
variables: {}
/reserve:
post:
tags:
- Reservations
summary: Reserve train
operationId: Reservetrain
parameters: []
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ReservetrainRequest'
example:
bookingReference: AZERTY
seats:
- 1A
- 2A
- 3A
trainId: express_2000
required: true
x-send-file-in-body: false
responses:
200:
description: ''
headers: {}
deprecated: false
servers:
- url: http://localhost:8181
variables: {}
/reservations:
post:
tags:
- Reservations
summary: make a reservation via ColTrain
operationId: makeareservationviaColTrain
parameters: []
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/makeareservationviaColTrainRequest'
example:
trainId: express_2000
numberOfSeats: 3
required: true
x-send-file-in-body: false
responses:
200:
description: ''
headers: {}
deprecated: false
servers:
- url: http://localhost:9991/api
variables: {}
components:
schemas:
ReservetrainRequest:
title: ReservetrainRequest
required:
- bookingReference
- seats
- trainId
type: object
properties:
bookingReference:
type: string
seats:
type: array
items:
type: string
description: ''
trainId:
type: string
example:
bookingReference: AZERTY
seats:
- 1A
- 2A
- 3A
trainId: express_2000
makeareservationviaColTrainRequest:
title: makeareservationviaColTrainRequest
required:
- trainId
- numberOfSeats
type: object
properties:
trainId:
type: string
numberOfSeats:
type: integer
format: int32
example:
trainId: express_2000
numberOfSeats: 3