Created
March 3, 2016 02:01
-
-
Save ecpplus/1373c676f602326955f8 to your computer and use it in GitHub Desktop.
[ifconfig API] Exported YAML of Swagger + API Gateway Extention
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
swagger: "2.0" | |
info: | |
version: "2016-03-01T14:43:03Z" | |
title: "ifconfig" | |
host: "IFCONFIGEXAMPLE.execute-api.ap-northeast-1.amazonaws.com" | |
basePath: "/prod" | |
schemes: | |
- "https" | |
paths: | |
/: | |
get: | |
produces: | |
- "application/json" | |
parameters: [] | |
responses: | |
200: | |
description: "200 response" | |
schema: | |
$ref: "#/definitions/Empty" | |
headers: {} | |
x-amazon-apigateway-integration: | |
responses: | |
default: | |
statusCode: "200" | |
responseTemplates: | |
application/json: "#set($ipAddresses = $input.params().header.get('X-Forwarded-For').split(','))\n\ | |
$ipAddresses[0]\n#set($dummy = \"dummy\")" | |
requestTemplates: | |
application/json: "{\"statusCode\" : 200}" | |
type: "mock" | |
definitions: | |
Empty: | |
type: "object" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment