We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f3708c commit e5043ddCopy full SHA for e5043dd
app/api/get-schema/[name]/route.ts
@@ -51,7 +51,10 @@ export async function GET(request: Request, context: any) {
51
}
52
53
try {
54
- const schemasDir = path.resolve("./public/api/schemas");
+ // In Vercel serverless functions, files included via outputFileTracingIncludes
55
+ // are typically relative to process.cwd(). Our config includes './schemas/v1/**/*'.
56
+ const schemasDir = path.join(process.cwd(), "schemas", "v1");
57
+
58
const filePath = safeJoin(schemasDir, `${safeSchemaName}.json`);
59
60
if (!filePath) {
0 commit comments