Skip to content

Commit 80ac4ab

Browse files
committed
fix(readme): update readme
1 parent fc841a7 commit 80ac4ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ export async function handler(event: unknown) {
4343

4444
### lambda-api
4545

46-
Wrap route handlers with `withValidation(...)` or call `validateLambdaApiRequest(...)` directly.
46+
Wrap route handlers with `withLambdaApiValidation(...)` or call `validateLambdaApiRequest(...)` directly.
4747

4848
```ts
4949
import {validateCreateCustomerOrderRequest} from "./generated/openapi-validators.js"
50-
import {withValidation} from "openapi-request-validation"
50+
import {withLambdaApiValidation} from "openapi-request-validation"
5151

5252
api.post(
5353
"/customers/:customerId/orders",
54-
withValidation(validateCreateCustomerOrderRequest, (req, res) => {
54+
withLambdaApiValidation(validateCreateCustomerOrderRequest, (req, res) => {
5555
res.send({ok: true})
5656
}),
5757
)

0 commit comments

Comments
 (0)