From c28e1e29594985d0dc267c783f1519f7be35be59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Wed, 18 Sep 2024 19:35:27 +0200 Subject: [PATCH 1/2] fix(v1/zod): formats: add error message if both sc and sc@fP --- apps/api/src/controllers/v1/types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index c44c1cc5..ab811067 100644 --- a/apps/api/src/controllers/v1/types.ts +++ b/apps/api/src/controllers/v1/types.ts @@ -70,7 +70,8 @@ export const scrapeOptions = z.object({ ]) .array() .optional() - .default(["markdown"]), + .default(["markdown"]) + .refine(x => !(x.includes("screenshot") && x.includes("screenshot@fullPage")), "You may only specify either screenshot or screenshot@fullPage"), headers: z.record(z.string(), z.string()).optional(), includeTags: z.string().array().optional(), excludeTags: z.string().array().optional(), From d338c3402bf34a88e23986535980d2a6cb241f0a Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 18 Sep 2024 15:18:44 -0400 Subject: [PATCH 2/2] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d0145a6b..2a843aa8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,7 +103,7 @@ This should return the response Hello, world! If you’d like to test the crawl endpoint, you can run this ```curl -curl -X POST http://localhost:3002/v0/crawl \ +curl -X POST http://localhost:3002/v1/crawl \ -H 'Content-Type: application/json' \ -d '{ "url": "https://mendable.ai"