-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
96 lines (92 loc) · 2.52 KB
/
api.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
---
openapi: 3.0.0
info:
description: "This is an api for getting a message that will tell the receiver information on when the next trash pickup is."
version: "1.0.0"
title: "Grouch Trash Message Service"
contact:
email: "matthew.js.porter@gmail.com"
servers:
- url: https://d9lz2a1tq2.execute-api.us-east-1.amazonaws.com/Prod
- url: http://localhost:3000
paths:
/v1/message:
get:
tags:
- "message"
summary: "Get a message from grouch trash service about when trash pickup is"
description: ""
operationId: "getMessage"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/Message"
401:
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
403:
description: "Forbidden"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
500:
description: "Server Error"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
security:
- authorizer: []
x-amazon-apigateway-integration:
responses:
default:
statusCode: 200
uri:
Fn::Join:
- ""
- - Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/
- Fn::ImportValue: grouch-message-function-GrouchMessageFunction
- /invocations
passthroughBehavior: when_no_match
httpMethod: POST
type: aws_proxy
components:
securitySchemes:
authorizer:
type: apiKey
name: 'X-API-KEY'
in: header
x-amazon-apigateway-authtype: token
x-amazon-apigateway-authorizer:
type: token
authorizerUri:
Fn::Join:
- ""
-
- Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/
- Fn::ImportValue: grouch-auth-function-AuthFunction
- /invocations
authorizerCredentials:
Fn::Sub: ${AuthRole.Arn}
schemas:
Message:
type: "object"
required:
- "text"
properties:
text:
type: "string"
Error:
type: "object"
required:
- "message"
properties:
message:
type: "string"