-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSampleMinimalApiNoAot.http
More file actions
90 lines (71 loc) · 2.25 KB
/
SampleMinimalApiNoAot.http
File metadata and controls
90 lines (71 loc) · 2.25 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
### Get all TODOs (works with reflection fallback)
GET http://localhost:57949/todos
### Get single TODO (works with reflection fallback)
GET http://localhost:57949/todos/1
### Get users endpoint (shows reflection fallback message)
GET http://localhost:57949/users
### Register user - Valid request (reflection fallback handles validation)
POST http://localhost:57949/users/registerWithAutoValidation
Content-Type: application/json
{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"password": "SecurePass123!"
}
### Register user - Invalid request (tests reflection fallback validation)
# Should return 400 with all validation errors collected
POST http://localhost:57949/users/registerWithAutoValidation
Content-Type: application/json
{
"firstName": "",
"lastName": "D",
"email": "invalid",
"password": "weak"
}
### Test property name attribution with reflection fallback
# FirstName and LastName use the same Name type
# Errors should show "FirstName" and "LastName", not "name"
POST http://localhost:57949/users/registerWithSharedNameType
Content-Type: application/json
{
"firstName": "",
"lastName": "",
"email": "test@example.com"
}
### Test property name attribution - Valid request
POST http://localhost:57949/users/registerWithSharedNameType
Content-Type: application/json
{
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com"
}
### Register with manual validation (no auto-validation)
POST http://localhost:57949/users/register
Content-Type: application/json
{
"firstName": "Alice",
"lastName": "Johnson",
"email": "alice@example.com",
"password": "MyPassword456"
}
### Register with manual validation - Invalid
POST http://localhost:57949/users/register
Content-Type: application/json
{
"firstName": "",
"lastName": "",
"email": "bad-email",
"password": "x"
}
### Test error responses - Not Found
GET http://localhost:57949/users/notfound/123
### Test error responses - Conflict
GET http://localhost:57949/users/conflict/456
### Test error responses - Forbidden
GET http://localhost:57949/users/forbidden/789
### Test error responses - Unauthorized
GET http://localhost:57949/users/unauthorized/101
### Test error responses - Unexpected (500)
GET http://localhost:57949/users/unexpected/999