Skip to content

Instantly share code, notes, and snippets.

@kevprice83
Created May 16, 2016 10:06
Show Gist options
  • Save kevprice83/4f947cb9f1980e0050ac94b80fc3f5ba to your computer and use it in GitHub Desktop.
Save kevprice83/4f947cb9f1980e0050ac94b80fc3f5ba to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Hello World API",
"description": "A simple Hello World API ",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Nicolas Grenié; [email protected]"
},
"license": {
"name": "MIT"
}
},
"host": "placeholder.example.com",
"basePath": "/api",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/hello": {
"get": {
"responses": {
"200": {
"description": "A response"
}
},
"tags": [
"hello"
],
"summary": "GET hello world",
"description": "",
"operationId": "GET hello world",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"x-amazon-apigateway-auth": {
"type": "none"
},
"x-amazon-apigateway-integration": {
"type": "AWS",
"uri": "arn:aws:apigateway:REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:REGION:ACCT_ID:function:FUNCTION_NAME/invocations",
"credentials": "arn:aws:iam::ACCT_ID:role/lambda_gateway_execution",
"httpMethod": "POST",
"requestTemplates": {
"application/json": "{\"user_key\":\"$input.params('user_key')\",\"resourcePath\": \"$context.resourcePath\",\"httpMethod\": \"$context.httpMethod\",\"body\": $input.json('$')}"
},
"requestParameters": {},
"cacheNamespace": "cache-namespace",
"cacheKeyParameters": [],
"responses": {
"default": {
"statusCode": "200",
"responseParameters": {},
"responseTemplates": {
"application/json": null
}
}
}
}
},
"post": {
"responses": {
"200": {
"description": "A response"
}
},
"x-amazon-apigateway-auth": {
"type": "none"
},
"x-amazon-apigateway-integration": {
"type": "AWS",
"uri": "arn:aws:apigateway:REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:REGION:ACCT_ID:function:FUNCTION_NAME/invocations",
"credentials": "arn:aws:iam::ACCT_ID:role/lambda_gateway_execution",
"httpMethod": "POST",
"requestTemplates": {
"application/json": "{\"user_key\":\"$input.params('user_key')\",\"resourcePath\": \"$context.resourcePath\",\"httpMethod\": \"$context.httpMethod\",\"body\": $input.json('$')}"
},
"requestParameters": {},
"cacheNamespace": "cache-namespace",
"cacheKeyParameters": [],
"responses": {
"default": {
"statusCode": "200",
"responseParameters": {},
"responseTemplates": {
"application/json": null
}
}
}
},
"tags": [
"hello"
],
"summary": "POST hello world",
"description": "",
"operationId": "POST hello world",
"consumes": [
"application/json"
],
"produces": [
"application/json"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment