-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
53 lines (50 loc) · 1.44 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
swagger: "2.0"
info:
title:
Fn::Sub: commit-on-release-${ENVIRONMENT}
description: Release-subscription API
contact:
name: Joakim Hedlund
version: 1.0.0
servers:
- url: https://aws.triplehead.net/commit-on-release/
description: The best of servers.
schemes:
- https
x-definitions:
AWSLambda: &AWSLambda
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/${ApiLambda.Arn}/invocations
passthroughBehavior: when_no_match
httpMethod: POST
type: aws_proxy
paths:
/release:
post:
<<: *AWSLambda
summary: Endpoint for newreleases.io webhooks
consumes:
- application/json
parameters:
- name: event
in: body
required: true
responses:
200:
description: maximum swag
400:
description: no bueno
x-amazon-apigateway-request-validator: validate-body-and-params
x-amazon-apigateway-request-validators:
validate-body-and-params:
validateRequestParameters: true
validateRequestBody: true
x-amazon-apigateway-gateway-responses:
DEFAULT_4XX: &gatewayCorsResponse
responseParameters:
gatewayresponse.header.Access-Control-Allow-Headers: "'Content-Type'"
gatewayresponse.header.Access-Control-Allow-Methods: "'OPTIONS,GET,POST'"
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
DEFAULT_5XX: *gatewayCorsResponse