Amazon API Gateway Mock Integration built with CloudFormation
Jump to navigation
Jump to search
Internal
CloudFormation Stack
OpenAPI AWS Specification
---
swagger: "2.0"
info:
version: "2019-03-27T20:21:37Z"
title: "elysium"
host: "7pc5pztvdi.execute-api.us-west-2.amazonaws.com"
basePath: "/test"
schemes:
- "https"
paths:
/a:
get:
consumes:
- "application/json"
produces:
- "application/json"
responses:
200:
description: "200 response"
schema:
$ref: "#/definitions/Empty"
x-amazon-apigateway-integration:
responses:
default:
statusCode: "200"
passthroughBehavior: "when_no_match"
requestTemplates:
application/json: "{\"statusCode\": 200}"
type: "mock"
definitions:
Empty:
type: "object"
title: "Empty Schema"
Procedure
- Copy the OpenAPI AWS metadata file in S3.
- Deploy the stack:
aws cloudformation deploy --stack-name elysium