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 {
5959Enables HTTP Basic Authentication for the route.
6060
6161``` js
62- @basic_auth (realm = " Admin Area " )
62+ @basic_auth
6363get / admin/ dashboard {
6464 // Only users with valid basic auth credentials can access
6565 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.
7474post / api/ register {
7575 @json
7676 body {
77- @regex (r" ^[a-zA-Z0-9_]+$" )
77+ @regex (pattern = r" ^[a-zA-Z0-9_]+$" )
7878 username: str,
7979
80- @regex (r" ^\d {3}-\d {2}-\d {4}$" )
80+ @regex (pattern = r" ^\d {3}-\d {2}-\d {4}$" )
8181 ssn: str
8282 }
8383}
@@ -178,7 +178,7 @@ post /api/identifier {
178178 body {
179179 @or ([
180180 @format (type= " email" ),
181- @regex (r" ^\d {10}$" )
181+ @regex (pattern = r" ^\d {10}$" )
182182 ])
183183 identifier: str // Can be either email or 10-digit number
184184 }
You can’t perform that action at this time.
0 commit comments