-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
122 lines (113 loc) · 3.12 KB
/
openapi.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
openapi: 3.0.0
info:
version: 1.0.0
title: API Gateway with Cognito
description: Demonstrate how you can use cognito with API Gateway for PKCE and CCF authentication flows.
contact:
name: Andres Moreno
tags:
- name: Tool
description: Tool endpoints
servers:
- url: https://x1orn0jhw1.execute-api.us-east-1.amazonaws.com/api
description: QA
security:
- jwt: [ ]
x-amazon-apigateway-request-validators:
Validate body, query string parameters, and headers:
validateRequestParameters: true
validateRequestBody: true
x-amazon-apigateway-gateway-responses:
BAD_REQUEST_BODY:
statusCode: 400
responseTemplates:
application/json: '{ "message": "$context.error.validationErrorString" }'
responseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
UNAUTHORIZED:
statusCode: 401
responseTemplates:
application/json: '{ "message": "Unauthorized" }'
responseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
ACCESS_DENIED:
statusCode: 401
responseTemplates:
application/json: '{ "message": "Unauthorized" }'
responseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
paths:
/echo:
post:
summary: Echo body
operationId: echo
description: |
Test endpoint that simply echos the body.
tags:
- Tool
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
description: 'Success'
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/badRequest'
'403':
description: Forbidden
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
enum:
- Forbidden
'500':
$ref: '#/components/responses/unexpectedError'
x-amazon-apigateway-request-validator: Validate body, query string parameters, and headers
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${EchoFunction.Arn}/invocations
httpMethod: POST
type: aws_proxy
components:
responses:
unexpectedError:
description: Unexpected error
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
enum:
- Something went wrong!
badRequest:
description: Bad Request
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
securitySchemes:
jwt:
type: http
scheme: bearer
bearerFormat: JWT