File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[package ]
22name = " email-sanitizer"
3- version = " 0.8 .0+sprint4"
3+ version = " 0.9 .0+sprint4"
44edition = " 2024"
55
66[dependencies ]
Original file line number Diff line number Diff line change 1+ POST http://localhost:8080/api/v1/validate-emails-bulk
2+ Content-Type: application/json
3+
4+ {
5+ "emails" : []
6+ }
7+
8+ // Expected Response:
9+ // HTTP/1.1 200 OK
10+ // content-type: application/json
11+ //
12+ // {
13+ // "results": [],
14+ // "valid_count": 0,
15+ // "invalid_count": 0
16+ // }
Original file line number Diff line number Diff line change 1+ POST http://localhost:8080/api/v1/validate-emails-bulk
2+ Content-Type: application/json
3+
4+ {
5+ "emails" : [
6+ " valid@example.com" ,
7+ " invalid-email" ,
8+ " user@nonexistent.invalid" ,
9+ " test@mailinator.com"
10+ ]
11+ }
12+
13+ // Expected Response:
14+ // HTTP/1.1 200 OK
15+ // content-type: application/json
16+ //
17+ // {
18+ // "results": [
19+ // {
20+ // "email": "valid@example.com",
21+ // "validation": {
22+ // "is_valid": true,
23+ // "status": "VALID",
24+ // "error": null
25+ // }
26+ // },
27+ // {
28+ // "email": "invalid-email",
29+ // "validation": {
30+ // "is_valid": false,
31+ // "status": null,
32+ // "error": {
33+ // "code": "INVALID_SYNTAX",
34+ // "message": "Email address has invalid syntax"
35+ // }
36+ // }
37+ // },
38+ // {
39+ // "email": "user@nonexistent.invalid",
40+ // "validation": {
41+ // "is_valid": false,
42+ // "status": null,
43+ // "error": {
44+ // "code": "INVALID_DOMAIN",
45+ // "message": "Email domain has no valid DNS records"
46+ // }
47+ // }
48+ // },
49+ // {
50+ // "email": "test@mailinator.com",
51+ // "validation": {
52+ // "is_valid": false,
53+ // "status": null,
54+ // "error": {
55+ // "code": "DISPOSABLE_EMAIL",
56+ // "message": "The email address domain is a provider of disposable email addresses"
57+ // }
58+ // }
59+ // }
60+ // ],
61+ // "valid_count": 1,
62+ // "invalid_count": 3
63+ // }
Original file line number Diff line number Diff line change 1+ POST http://localhost:8080/api/v1/validate-emails-bulk?check_role_based=true
2+ Content-Type: application/json
3+
4+ {
5+ "emails" : [
6+ " user@example.com" ,
7+ " admin@example.com" ,
8+ " support@apple.com"
9+ ]
10+ }
11+
12+ // Expected Response:
13+ // HTTP/1.1 200 OK
14+ // content-type: application/json
15+ //
16+ // {
17+ // "results": [
18+ // {
19+ // "email": "user@example.com",
20+ // "validation": {
21+ // "is_valid": true,
22+ // "status": "VALID",
23+ // "error": null
24+ // }
25+ // },
26+ // {
27+ // "email": "admin@example.com",
28+ // "validation": {
29+ // "is_valid": false,
30+ // "status": null,
31+ // "error": {
32+ // "code": "ROLE_BASED_EMAIL",
33+ // "message": "Email address uses a role-based local part"
34+ // }
35+ // }
36+ // },
37+ // {
38+ // "email": "support@apple.com",
39+ // "validation": {
40+ // "is_valid": false,
41+ // "status": null,
42+ // "error": {
43+ // "code": "ROLE_BASED_EMAIL",
44+ // "message": "Email address uses a role-based local part"
45+ // }
46+ // }
47+ // }
48+ // ],
49+ // "valid_count": 1,
50+ // "invalid_count": 2
51+ // }
Original file line number Diff line number Diff line change 1+ POST http://localhost:8080/api/v1/validate-emails-bulk
2+ Content-Type: application/json
3+
4+ {
5+ "emails" : [
6+ " user@example.com" ,
7+ " test@example.org" ,
8+ " valid@example.net"
9+ ]
10+ }
11+
12+ // Expected Response:
13+ // HTTP/1.1 200 OK
14+ // content-type: application/json
15+ //
16+ // {
17+ // "results": [
18+ // {
19+ // "email": "user@example.com",
20+ // "validation": {
21+ // "is_valid": true,
22+ // "status": "VALID",
23+ // "error": null
24+ // }
25+ // },
26+ // {
27+ // "email": "test@example.org",
28+ // "validation": {
29+ // "is_valid": true,
30+ // "status": "VALID",
31+ // "error": null
32+ // }
33+ // },
34+ // {
35+ // "email": "valid@example.net",
36+ // "validation": {
37+ // "is_valid": true,
38+ // "status": "VALID",
39+ // "error": null
40+ // }
41+ // }
42+ // ],
43+ // "valid_count": 3,
44+ // "invalid_count": 0
45+ // }
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ MIT License.
171171 - ** DoD** : Blocklists loaded at startup, role detection accuracy > 95%. ✅
172172
1731738. ** Bulk Processing**
174- - Add async bulk validation endpoint (` POST /bulk/validate` ).
174+ - Add async bulk validation endpoint (` POST /bulk/validate` ). ✅
175175 - Implement job queue (Redis or MongoDB).
176176 - ** DoD** : Processes 10K emails in < 5 mins, returns job status.
177177
You can’t perform that action at this time.
0 commit comments