-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yaml
86 lines (79 loc) · 1.78 KB
/
main.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
swagger: "2.0"
info:
title: REST API with 3 endpoints
description: REST API Gateway backed by 3 AWS Lambda Functions
version: 1.0.0
host: https://<api-id>.execute-api.<region>.amazonaws.com
basePath: /v1
schemes:
- https
paths:
/goodbye:
get:
summary: Returns goodbye message
parameters:
- in: header
name: Authorization
schema:
type: string
format: "Authorization: <token>"
required: true
produces:
- application/json
responses:
200:
message: Goodbye!
401:
message: Unauthorized
/hello:
get:
summary: Returns standard hello message
produces:
- application/json
responses:
200:
message: "Hello, world!"
post:
summary: Returns standard hello message
produces:
- application/json
responses:
200:
message: "Hello, world!"
/hello?Name=John:
parameters:
- name: Name
in: query
description: Name to say hello back
type: string
required: false
get:
summary: Returns hello message based on parameter
produces:
- application/json
responses:
200:
message: "Hello, %{Name}!"
post:
summary: Returns hello message based on parameter
produces:
- application/json
responses:
200:
message: "Hello, %{Name}!"
/welcome:
get:
summary: Returns welcome message
parameters:
- in: header
name: x-api-key
schema:
type: string
required: true
produces:
- application/json
responses:
200:
message: Welcome :)
401:
message: Unauthorized