Skip to content

Commit 89fd385

Browse files
committed
attempt to handle DELETE at API root.
needed due to EventBridge API Destinations
1 parent eeac95a commit 89fd385

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

openapi.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,49 @@ paths:
8787
httpMethod: POST
8888
uri:
8989
Fn::Sub: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${CreateEntityFunction.Arn}/invocations"
90+
# Created to handle EventBridge API Destination
91+
delete:
92+
summary: Delete all catalog items
93+
description: Delete a catalog item based on entity in body
94+
parameters:
95+
- $ref: "#/components/parameters/headerContentTypeJson"
96+
requestBody:
97+
required: true
98+
content:
99+
application/json:
100+
schema:
101+
$ref: "#/components/schemas/Entity"
102+
responses:
103+
'200':
104+
description: No Content
105+
content:
106+
application/json:
107+
schema:
108+
$ref: "#/components/schemas/EmptyResponse"
109+
'400':
110+
description: Client failure
111+
content:
112+
application/json:
113+
schema:
114+
$ref: "#/components/schemas/ErrorResponse"
115+
'500':
116+
description: Server failure
117+
content:
118+
application/json:
119+
schema:
120+
$ref: "#/components/schemas/ErrorResponse"
121+
security:
122+
- serverlessOpsCognitoPool:
123+
- Fn::Sub: https://${Hostname}/catalog.write
124+
x-amazon-apigateway-integration:
125+
type: AWS_PROXY
126+
httpMethod: POST
127+
uri:
128+
Fn::Sub: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${DeleteEntityFunction}/invocations"
129+
requestParameters:
130+
integration.request.path.namespace: "method.request.body.metadata.namespace"
131+
integration.request.path.kind: "method.request.body.kind"
132+
integration.request.path.name: "method.request.body.metadata.name"
90133

91134
"/catalog/{namespace}/{kind}":
92135
get:

0 commit comments

Comments
 (0)