Created
June 21, 2018 06:25
-
-
Save koladilip/6fb1bbd1cb878a5897a0eab2bcdd06d4 to your computer and use it in GitHub Desktop.
This is for creating API in AWS API Gateway: https://medium.com/tensult/make-a-website-dynamic-using-apis-f5d07def5d77
This file contains hidden or 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": { | |
"title": "mywebsite" | |
}, | |
"paths": { | |
"/contact-us": { | |
"post": { | |
"produces": [ | |
"application/json" | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"schema": { | |
"$ref": "#/definitions/Empty" | |
}, | |
"headers": { | |
"Access-Control-Allow-Origin": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"options": { | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"schema": { | |
"$ref": "#/definitions/Empty" | |
}, | |
"headers": { | |
"Access-Control-Allow-Origin": { | |
"type": "string" | |
}, | |
"Access-Control-Allow-Methods": { | |
"type": "string" | |
}, | |
"Access-Control-Allow-Headers": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"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