-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
107 lines (102 loc) · 3 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
openapi: 3.1.0
info:
title: Customer OpenAPI
description: |-
This is a Customer Server based on the OpenAPI 3.1 specification.
Some useful links:
- [The Customer repository](https://github.com/lg-lab/food-ordering-system/tree/main/customer-service)
- [The source API definition for the Customer](https://github.com/lg-lab/food-ordering-system/tree/main/customer-service/customer-application/src/main/resources/spec/openapi.yaml)
termsOfService: https://github.com/lg-lab/food-ordering-system
contact:
email: [email protected]
license:
name: GNU General Public License
url: https://github.com/lg-lab/food-ordering-system/tree/main/LICENSE
version: v3.0
externalDocs:
description: Find out more about Order System
url: https://github.com/lg-lab/food-ordering-system
servers:
- url: http://localhost:8181
tags:
- name: customer
description: Operations about customer
externalDocs:
description: Find out more about our order system
url: https://github.com/lg-lab/food-ordering-system
paths:
/customer:
post:
tags:
- customer
summary: Add a new customer to the order system
description: Add a new customer to the order system
operationId: addCustomer
requestBody:
$ref: '#/components/requestBodies/Customer'
responses:
'202':
description: Accepted
'400':
description: Invalid input
'422':
description: Validation exception
security:
- customer_auth:
- write:customer
components:
schemas:
Customer:
type: object
properties:
id:
type: string
format: uuid
username:
type: string
examples: [username]
firstName:
type: string
examples: [firstName]
lastName:
type: string
examples: [lastName]
requestBodies:
Customer:
description: Customer object that needs to be added to the order system
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
examples:
customer1:
$ref: '#/components/examples/customer1'
customer2:
$ref: '#/components/examples/customer2'
examples:
customer1:
summary: An example of a Customer 1
value:
id: d215b5f8-0249-4dc5-89a3-51fd148cfb41
username: lgusername1
firstName: lgfirstName1
lastName: lglastName1
customer2:
summary: An example of a Customer 2
value:
id: d215b5f8-0249-4dc5-89a3-51fd148cfb42
username: lgusername2
firstName: lgfirstName2
lastName: lglastName2
securitySchemes:
customer_auth:
type: oauth2
flows:
implicit:
authorizationUrl: https://petstore3.swagger.io/oauth/authorize
scopes:
write:customer: add customer in your system
api_key:
type: apiKey
name: api_key
in: header