-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
93 lines (93 loc) · 2.61 KB
/
openapi.yaml
File metadata and controls
93 lines (93 loc) · 2.61 KB
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
openapi: '3.0.1'
info:
title: 'IdioSplash-API'
version: '2023-10-16 16:38:59UTC'
paths:
/GenerateOTP:
post:
summary: Generate OTP
responses:
200:
description: Successful OTP generation
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateOTPResponse'
400:
description: Invalid email for this organization
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
409:
description: OTP previously generated for the email
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
500:
description: Error writing to the database
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
default:
description: Default response for POST /GenerateOTP
x-amazon-apigateway-integration:
payloadFormatVersion: '2.0'
type: 'aws_proxy'
httpMethod: 'POST'
uri: 'arn:aws:apigateway:<REGION>:lambda:path/2015-03-31/functions/<GENERATE OTP LAMBDA ARN>/invocations'
connectionType: 'INTERNET'
/VerifyOTP:
post:
summary: Verify OTP
responses:
200:
description: OTP verified successfully
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyOTPResponse'
500:
description: Incorrect OTP or error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
default:
description: Default response for POST /VerifyOTP
x-amazon-apigateway-integration:
payloadFormatVersion: '2.0'
type: 'aws_proxy'
httpMethod: 'POST'
uri: 'arn:aws:apigateway:<REGION>:lambda:path/2015-03-31/functions/<VERIFY OTP LAMBDA ARN>/invocations'
connectionType: 'INTERNET'
x-amazon-apigateway-cors:
allowMethods:
- 'GET'
- 'POST'
allowHeaders:
- 'content-type'
maxAge: 0
allowCredentials: false
allowOrigins:
- '<YOUR FRONTEND URL>'
x-amazon-apigateway-importexport-version: '1.0'
components:
schemas:
GenerateOTPResponse:
type: object
properties:
email:
type: string
VerifyOTPResponse:
type: object
properties:
message:
type: string
ErrorResponse:
type: object
properties:
message:
type: string