-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathswagger.json
More file actions
72 lines (71 loc) · 2.17 KB
/
Copy pathswagger.json
File metadata and controls
72 lines (71 loc) · 2.17 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
{
"openapi": "3.0.0",
"info": {
"title": "EdTech Appwrite-Express API",
"version": "1.0.0",
"description": "API documentation for the EdTech Appwrite-Express API"
},
"paths": {
"/api/auth/signup": {
"post": {
"summary": "Register a new user",
"description": "Create a new user account with email and password.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email", "password"],
"properties": {
"email": { "type": "string", "example": "user@example.com" },
"password": { "type": "string", "example": "strongpassword123" },
"name": { "type": "string", "example": "vance" }
}
}
}
}
},
"responses": {
"201": { "description": "User registered successfully" },
"400": { "description": "Invalid input or user already exists" }
}
}
},
"/api/auth/login": {
"post": {
"summary": "User login",
"description": "Authenticate user with email and password.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email", "password"],
"properties": {
"email": { "type": "string", "example": "user@example.com" },
"password": { "type": "string", "example": "strongpassword123" }
}
}
}
}
},
"responses": {
"200": { "description": "Login successful" },
"401": { "description": "Invalid email or password" }
}
}
},
"/api/auth/logout": {
"post": {
"summary": "Logout user",
"description": "Logs out the currently authenticated user.",
"responses": {
"200": { "description": "Logout successful" },
"401": { "description": "User is not authenticated" }
}
}
}
}
}