From b521bbd97f666e51adf6f3703a10954792901073 Mon Sep 17 00:00:00 2001 From: raix <1136718+raix@users.noreply.github.com> Date: Fri, 10 Nov 2023 22:17:20 +0100 Subject: [PATCH] Rename generated file for clarity and origin --- .gitignore | 3 + application/account-management/Api/Api.csproj | 4 +- .../WebApp/src/lib/api/client.ts | 2 +- .../WebApp/src/lib/api/schema.d.ts | 171 ------------------ 4 files changed, 6 insertions(+), 174 deletions(-) delete mode 100644 application/account-management/WebApp/src/lib/api/schema.d.ts diff --git a/.gitignore b/.gitignore index 547682cd1..07cd82bbb 100644 --- a/.gitignore +++ b/.gitignore @@ -378,3 +378,6 @@ FodyWeavers.xsd # macOS files .DS_Store + +# Generated files +**/*.generated.d.ts \ No newline at end of file diff --git a/application/account-management/Api/Api.csproj b/application/account-management/Api/Api.csproj index b33381bc5..6aa6520fb 100644 --- a/application/account-management/Api/Api.csproj +++ b/application/account-management/Api/Api.csproj @@ -35,8 +35,8 @@ - - + + diff --git a/application/account-management/WebApp/src/lib/api/client.ts b/application/account-management/WebApp/src/lib/api/client.ts index def5fe430..c55954fe2 100644 --- a/application/account-management/WebApp/src/lib/api/client.ts +++ b/application/account-management/WebApp/src/lib/api/client.ts @@ -1,5 +1,5 @@ import createClient from "openapi-fetch"; -import type { paths } from "./schema"; +import type { paths } from "./api.generated"; const baseUrl = "https://localhost:8443"; export const accountManagementApi = createClient({ baseUrl }); diff --git a/application/account-management/WebApp/src/lib/api/schema.d.ts b/application/account-management/WebApp/src/lib/api/schema.d.ts deleted file mode 100644 index f6b0c5b56..000000000 --- a/application/account-management/WebApp/src/lib/api/schema.d.ts +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - "/api/tenants/{id}": { - get: { - parameters: { - path: { - id: string; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - put: { - parameters: { - path: { - id: string; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["UpdateTenantCommand"]; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - delete: { - parameters: { - path: { - id: string; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - }; - "/api/tenants": { - post: { - requestBody: { - content: { - "application/json": components["schemas"]["CreateTenantCommand"]; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - }; - "/api/users/{id}": { - get: { - parameters: { - path: { - id: string; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - put: { - parameters: { - path: { - id: string; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["UpdateUserCommand"]; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - delete: { - parameters: { - path: { - id: string; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - }; - "/api/users": { - post: { - requestBody: { - content: { - "application/json": components["schemas"]["CreateUserCommand"]; - }; - }; - responses: { - /** @description Success */ - 200: { - content: never; - }; - }; - }; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - CreateTenantCommand: { - subdomain?: string | null; - name?: string | null; - phone?: string | null; - email?: string | null; - }; - CreateUserCommand: { - tenantId?: components["schemas"]["TenantId"]; - email?: string | null; - userRole?: components["schemas"]["UserRole"]; - }; - TenantId: { - value?: string | null; - }; - UpdateTenantCommand: { - name?: string | null; - phone?: string | null; - }; - UpdateUserCommand: { - userRole?: components["schemas"]["UserRole"]; - email?: string | null; - }; - /** @enum {string} */ - UserRole: "TenantUser" | "TenantAdmin" | "TenantOwner"; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type $defs = Record; - -export type external = Record; - -export type operations = Record;