Last active
November 30, 2019 00:20
-
-
Save packetchef/e5fa9750294ec55a501742831e240717 to your computer and use it in GitHub Desktop.
AWS API Gateway REST API to return a list of IP addresses (Swagger)
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": "2019-10-28T15:48:36Z", | |
"title": "ReturnIPList" | |
}, | |
"host": “aabbccddeeff.execute-api.us-east-2.amazonaws.com", | |
"basePath": “/prod”, | |
"schemes": [ | |
"https" | |
], | |
"paths": { | |
"/": { | |
"get": { | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"text/plain" | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"schema": { | |
"$ref": "#/definitions/Empty" | |
}, | |
"headers": { | |
"Content-Type": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"x-amazon-apigateway-integration": { | |
"responses": { | |
"default": { | |
"statusCode": "200", | |
"responseParameters": { | |
"method.response.header.Content-Type": "'plain/text'" | |
}, | |
"responseTemplates": { | |
"text/plain": “1.2.3.4\n22.33.44.55\n” | |
} | |
} | |
}, | |
"requestTemplates": { | |
"application/json": "{\"statusCode\": 200}" | |
}, | |
"passthroughBehavior": "when_no_match", | |
"type": "mock" | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Empty": { | |
"type": "object", | |
"title": "Empty Schema" | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment