add openapi-typescript and openapi-fetch to project and generate types with it

This commit is contained in:
maxDorninger
2025-08-21 19:42:42 +02:00
parent 6c4b6a52cf
commit b147bb8434
6 changed files with 4122 additions and 12 deletions

3785
web/src/lib/api/api.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

6
web/src/lib/api/index.ts Normal file
View File

@@ -0,0 +1,6 @@
import createClient from "openapi-fetch";
import type { paths } from "./api.d.ts";
import { env } from '$env/dynamic/public';
const client = createClient<paths>({ baseUrl: env.PUBLIC_API_URL });
export default client;