-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer.yml
69 lines (69 loc) · 1.56 KB
/
customer.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
openapi: "3.0.2"
info:
title: API Customer
version: "1.0"
servers:
- url: https://localhost:8080
tags:
- name: Customer
description: Customer specific data.
paths:
/customer:
post:
tags:
- Customer
summary: Create Customer
operationId: createCustomer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
responses:
'200':
description: OK
content:
'application/json':
schema:
$ref: '#/components/schemas/Customer'
/customer/{customerId}:
get:
tags:
- Customer
summary: Retrieve Customer
operationId: getCustomer
parameters:
- name: customerId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
content:
'application/json':
schema:
$ref: '#/components/schemas/Customer'
'404':
description: NOT FOUND
components:
schemas:
# TODO: how to fail is values are sent but with null?
Customer:
type: object
properties:
id:
type: number
description: Id of the customer
firstName:
type: string
description: First name of the customer
lastName:
type: string
description: Last name of the customer
required:
- id
- firstName
- lastName