Amazon API Gateway Mock Integration built with CloudFormation: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
swagger: "2.0" | swagger: "2.0" | ||
info: | info: | ||
title: "elysium" | title: "elysium" | ||
schemes: | schemes: | ||
- "https" | - "https" |
Revision as of 20:22, 27 March 2019
Internal
CloudFormation Stack
OpenAPI AWS Specification
---
swagger: "2.0"
info:
title: "elysium"
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