-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger-api.yml
106 lines (104 loc) · 2.48 KB
/
swagger-api.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
swagger: "2.0"
info:
description: "This is a sample definition of API created for the Lambdas Workshop "
version: "1.0.0"
title: "Consumer Info - Python"
contact:
name: "Jackson Coelho"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "lambdas-workshop.com"
basePath: "/v2"
tags:
- name: "consumer"
description: "Everything about your Consumers"
schemes:
- "https"
- "http"
paths:
/consumer:
get:
tags:
- "consumer"
summary: "Get the list of consumers"
description: "Get the list of consumers"
responses:
200:
description: "List of consumers successfully loaded"
schema:
type: "array"
items:
$ref: "#/definitions/Consumer"
post:
tags:
- "consumer"
summary: "Add a new consumer"
description: ""
operationId: "addConsumer"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Consumer object that needs to be added"
required: true
schema:
$ref: "#/definitions/Consumer"
responses:
405:
description: "Invalid input"
201:
description: "Consumer created"
/consumer/{cid}:
get:
tags:
- "consumer"
description: "Get the consumer data based on CID"
summary: "Get consumer by CID"
produces:
- "application/json"
parameters:
- name: "cid"
in: "path"
description: "ID of consumer to return"
required: true
type: "string"
responses:
200:
description: "Consumer returned successfully"
schema:
$ref: "#/definitions/Consumer"
delete:
tags:
- "consumer"
description: "Delete consumer from database"
summary: "Delete consumer"
parameters:
- name: "cid"
in: "path"
description: "ID of consumer to delete"
required: true
type: "string"
responses:
204:
description: "Consumer deleted successuflly"
definitions:
Consumer:
type: "object"
required:
- "cid"
properties:
cid:
type: "string"
pid:
type: "string"
known_your_customer:
type: "boolean"
is_blocked:
type: "boolean"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"