|
2 | 2 | "components": { |
3 | 3 | "securitySchemes": { |
4 | 4 | "LambdaAuthorizer": { |
5 | | - "type": "apiKey", |
6 | | - "name": "Authorization", |
7 | 5 | "in": "header", |
8 | | - "x-amazon-apigateway-authtype": "custom", |
| 6 | + "name": "Authorization", |
| 7 | + "type": "apiKey", |
9 | 8 | "x-amazon-apigateway-authorizer": { |
10 | | - "type": "request", |
11 | | - "authorizerUri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${AUTHORIZER_LAMBDA_ARN}/invocations", |
12 | 9 | "authorizerCredentials": "${APIG_EXECUTION_ROLE_ARN}", |
| 10 | + "authorizerResultTtlInSeconds": 0, |
| 11 | + "authorizerUri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${AUTHORIZER_LAMBDA_ARN}/invocations", |
13 | 12 | "identitySource": "method.request.header.Authorization", |
14 | | - "authorizerResultTtlInSeconds": 0 |
15 | | - } |
| 13 | + "type": "request" |
| 14 | + }, |
| 15 | + "x-amazon-apigateway-authtype": "custom" |
16 | 16 | } |
17 | 17 | } |
18 | 18 | }, |
|
25 | 25 | "paths": { |
26 | 26 | "/": { |
27 | 27 | "get": { |
28 | | - "summary": "Health check", |
29 | 28 | "description": "Returns 200 OK if the API is up.", |
30 | 29 | "responses": { |
31 | 30 | "200": { |
32 | 31 | "description": "OK" |
33 | 32 | } |
34 | 33 | }, |
| 34 | + "security": [ |
| 35 | + { |
| 36 | + "LambdaAuthorizer": [] |
| 37 | + } |
| 38 | + ], |
| 39 | + "summary": "Health check", |
35 | 40 | "x-amazon-apigateway-integration": { |
36 | 41 | "contentHandling": "CONVERT_TO_TEXT", |
37 | 42 | "credentials": "${APIG_EXECUTION_ROLE_ARN}", |
|
45 | 50 | "timeoutInMillis": 29000, |
46 | 51 | "type": "AWS_PROXY", |
47 | 52 | "uri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${HELLO_WORLD_LAMBDA_ARN}/invocations" |
| 53 | + } |
| 54 | + } |
| 55 | + }, |
| 56 | + "/letters": { |
| 57 | + "get": { |
| 58 | + "description": "Returns 200 OK with paginated letter ids.", |
| 59 | + "responses": { |
| 60 | + "200": { |
| 61 | + "description": "OK" |
| 62 | + } |
48 | 63 | }, |
49 | 64 | "security": [ |
50 | 65 | { |
51 | 66 | "LambdaAuthorizer": [] |
52 | 67 | } |
53 | | - ] |
| 68 | + ], |
| 69 | + "summary": "Get letters", |
| 70 | + "x-amazon-apigateway-integration": { |
| 71 | + "contentHandling": "CONVERT_TO_TEXT", |
| 72 | + "credentials": "${APIG_EXECUTION_ROLE_ARN}", |
| 73 | + "httpMethod": "POST", |
| 74 | + "passthroughBehavior": "WHEN_NO_TEMPLATES", |
| 75 | + "responses": { |
| 76 | + ".*": { |
| 77 | + "statusCode": "200" |
| 78 | + } |
| 79 | + }, |
| 80 | + "timeoutInMillis": 29000, |
| 81 | + "type": "AWS_PROXY", |
| 82 | + "uri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${GET_LETTERS_LAMBDA_ARN}/invocations" |
| 83 | + } |
54 | 84 | } |
55 | 85 | } |
56 | 86 | } |
|
0 commit comments