-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
137 lines (130 loc) · 3.4 KB
/
swagger.yml
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
swagger: "2.0"
info:
description: This is the swagger file that goes with our server code
version: "1.0.0"
title: Swagger ReST Article
consumes:
- application/json
produces:
- application/json
basePath: /api
# Paths supported by the server application
paths:
/customer/{cno}:
get:
operationId: api.customerfind
tags:
- customer
summary: Read one customer from the customer db
description: Read one customer from the customer db
parameters:
- name: cno
in: path
description: Last name of the customer to get from the db
type: string
required: True
responses:
200:
description: Successfully read customer from customer db operation
schema:
properties:
fname:
type: string
lname:
type: string
delete:
operationId: api.customerdelete
tags:
- customer
summary: Delete a customer from the customer db
description: Delete a customer
parameters:
- name: cno
in: path
type: string
required: True
responses:
200:
description: Successfully deleted a customer from customer db
/order:
post:
operationId: api.ordercreate
tags:
- people
summary: Create a new order
description: Creating a new order and adding it to the DB
parameters:
- name: order
in: body
description: Person to create
required: True
schema:
type: object
properties:
cid:
type: string
description: Customer ID
pizza:
type: string
description: Pizza ID
responses:
201:
description: Successfully created person in list
/order/{oid}:
get:
operationId: api.orderstatus
tags:
- customer
summary: Read one customer from the customer db
description: Read one customer from the customer db
parameters:
- name: oid
in: path
description: Last name of the customer to get from the db
type: string
required: True
responses:
200:
description: Successfully read customer from customer db operation
schema:
properties:
fname:
type: string
lname:
type: string
timestamp:
type: string
/food/{fno}:
get:
operationId: api.findfood
tags:
- customer
summary: Read one food from the food db
description: Read one food from the food db
parameters:
- name: fno
in: path
description: to get food name from the db
type: string
required: True
responses:
200:
description: Successfully read food from food db
schema:
properties:
fname:
type: string
delete:
operationId: api.deletefood
tags:
- food
summary: Delete a food from the food db
description: Delete a customer
parameters:
- name: fno
in: path
type: string
required: True
responses:
200:
description: Successfully deleted a food from food db