diff --git a/apps/studio-next/src/app/api/v1/generate/route.tsx b/apps/studio-next/src/app/api/v1/generate/route.tsx new file mode 100644 index 000000000..ff46c69cb --- /dev/null +++ b/apps/studio-next/src/app/api/v1/generate/route.tsx @@ -0,0 +1,6 @@ +import { NextResponse } from 'next/server'; + +export async function POST(request: Request) { + const response = await request.json(); + return new NextResponse(`route POST -> ${JSON.stringify(response)}`, {status: 201}); +} diff --git a/apps/studio-next/src/services/server-api.service.ts b/apps/studio-next/src/services/server-api.service.ts index ce7c68094..550e2c507 100644 --- a/apps/studio-next/src/services/server-api.service.ts +++ b/apps/studio-next/src/services/server-api.service.ts @@ -12,7 +12,7 @@ export interface ServerAPIProblem { } export class ServerAPIService extends AbstractService { - private serverPath = 'https://api.asyncapi.com/v1'; + private serverPath = 'http://localhost:3001/api/v1'; async generate(data: { asyncapi: string | Record,