-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi-docs.yaml
104 lines (101 loc) · 2.76 KB
/
api-docs.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
openapi: 3.0.3
info:
title: Phone numbers API v1
description: Phone numbers API v1
version: 1.0.0
servers:
- url: 'http://localhost:8080/api/v1/'
paths:
/phonenumbers:
get:
description: Returns phonenumbers with optional filtering and pagination
operationId: searchPhoneNumbers
parameters:
- in: query
name: customerName
required: false
schema:
type: string
example: Moe
- in: query
name: page
required: false
schema:
type: integer
default: 0
example: 0
- in: query
name: limit
required: false
schema:
type: integer
default: 10
example: 10
responses:
200:
description: phonenumbers response
content:
application/json:
schema:
type: object
properties:
totalCount:
type: integer
records:
type: array
items:
$ref: '#components/schemas/PhoneNumber'
example:
totalCount: 10
records:
- subscriberNumber: '455555551'
customerName: Moe
status: ACTIVE
- subscriberNumber: '455555552'
customerName: Moe
status: IN_ACTIVE
/phonenumbers/{subscriberNumber}:
patch:
description: Updates an exisitng phonenumber
operationId: updatePhoneNumber
parameters:
- in: path
name: subscriberNumber
required: true
schema:
type: string
example: '455555551'
requestBody:
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum: [ACTIVE,IN_ACTIVE]
example:
status: ACTIVE
responses:
200:
description: Updated PhoneNumber resource
content:
application/json:
schema:
$ref: '#components/schemas/PhoneNumber'
example:
subscriberNumber: '455555551'
customerName: Bill
status: ACTIVE
components:
schemas:
PhoneNumber:
type: object
properties:
subscriberNumber:
type: string
customerName:
type: string
status:
type: string
enum: [ACTIVE,IN_ACTIVE]