File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
docs/reference/directives Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ get /api/users {
59
59
Enables HTTP Basic Authentication for the route.
60
60
61
61
``` js
62
- @basic_auth (realm = " Admin Area " )
62
+ @basic_auth
63
63
get / admin/ dashboard {
64
64
// Only users with valid basic auth credentials can access
65
65
return " Admin dashboard" ;
Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ Validates that a string matches a given regular expression pattern.
74
74
post / api/ register {
75
75
@json
76
76
body {
77
- @regex (r" ^[a-zA-Z0-9_]+$" )
77
+ @regex (pattern = r" ^[a-zA-Z0-9_]+$" )
78
78
username: str,
79
79
80
- @regex (r" ^\d {3}-\d {2}-\d {4}$" )
80
+ @regex (pattern = r" ^\d {3}-\d {2}-\d {4}$" )
81
81
ssn: str
82
82
}
83
83
}
@@ -178,7 +178,7 @@ post /api/identifier {
178
178
body {
179
179
@or ([
180
180
@format (type= " email" ),
181
- @regex (r" ^\d {10}$" )
181
+ @regex (pattern = r" ^\d {10}$" )
182
182
])
183
183
identifier: str // Can be either email or 10-digit number
184
184
}
You can’t perform that action at this time.
0 commit comments