-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.yaml
69 lines (69 loc) · 2.05 KB
/
swagger.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
---
swagger: 2.0
info:
title: AwsServerlessExpressApi
paths:
/:
get:
x-amazon-apigateway-integration:
type: aws_proxy
httpMethod: POST
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetIndexFunction.Arn}/invocations
/{proxy+}:
get:
parameters:
- name: proxy
in: path
required: true
type: string
x-amazon-apigateway-integration:
type: aws_proxy
httpMethod: POST
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetIndexFunction.Arn}/invocations
/assets/{proxy+}:
get:
parameters:
- name: proxy
in: path
required: true
type: string
x-amazon-apigateway-integration:
type: http_proxy
httpMethod: GET
uri: http://YOUR_UNIQUE_BUCKET_NAME.s3.amazonaws.com/assets/{proxy}
requestParameters:
integration.request.path.proxy: method.request.path.proxy
/client/{proxy+}:
get:
parameters:
- name: proxy
in: path
required: true
type: string
x-amazon-apigateway-integration:
type: http_proxy
httpMethod: GET
uri: http://YOUR_UNIQUE_BUCKET_NAME.s3.amazonaws.com/client/{proxy}
requestParameters:
integration.request.path.proxy: method.request.path.proxy
/api/posts:
get:
x-amazon-apigateway-integration:
type: aws_proxy
httpMethod: POST
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetPostsFunction.Arn}/invocations
/api/posts/{slug}:
get:
parameters:
- name: slug
in: path
required: true
type: string
x-amazon-apigateway-integration:
type: aws_proxy
httpMethod: POST
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetPostFunction.Arn}/invocations