Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonHolman/2bbeae8853d7f7763f89a71d5603be5e to your computer and use it in GitHub Desktop.
Save JonHolman/2bbeae8853d7f7763f89a71d5603be5e to your computer and use it in GitHub Desktop.
part-4-adding-category-landing-and-home-page: openapi.yaml adding root route for the home page
/:
get:
responses:
200:
description: "200 response"
content:
text/html:
schema:
$ref: "#/components/schemas/Empty"
x-amazon-apigateway-integration:
type: "aws"
credentials:
Fn::GetAtt: [RestAPIRole, Arn]
uri: "arn:aws:apigateway:us-east-1:dynamodb:action/Query"
responses:
default:
statusCode: "200"
responseTemplates:
text/html:
Fn::FindInMap: [ ResponseTemplates, Page, VTL ]
requestTemplates:
application/json:
Fn::Join:
- ''
- - >-
{"TableName": "
- Ref: AWS::StackName
- >-
"
- |
,
"IndexName": "ItemTypeByDate",
"KeyConditionExpression": "pk = :pk",
"ExpressionAttributeValues": {
":pk": {"S": "article"}
},
"ScanIndexForward": false
}
passthroughBehavior: "never"
httpMethod: "POST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment