Pārlūkot izejas kodu

feat(service): openapi 适配

feige996 7 mēneši atpakaļ
vecāks
revīzija
fee5f23d37

+ 1 - 1
openapi-ts-request.config.ts

@@ -2,7 +2,7 @@ import type { GenerateServiceProps } from 'openapi-ts-request'
 
 export default [
   {
-    schemaPath: 'http://petstore.swagger.io/v2/swagger.json',
+    schemaPath: 'https://ukw0y1.laf.run/unibest-opapi-test.json',
     serversPath: './src/service',
     requestLibPath: `import request from '@/http/vue-query';\n import { CustomRequestOptions } from '@/http/types';`,
     requestOptionsType: 'CustomRequestOptions',

+ 1 - 1
package.json

@@ -87,7 +87,7 @@
     "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
     "build:quickapp-webview-union": "uni build -p quickapp-webview-union",
     "type-check": "vue-tsc --noEmit",
-    "openapi-ts-request": "openapi-ts",
+    "openapi": "openapi-ts",
     "prepare": "git init && husky && node ./scripts/create-base-files.js",
     "docker:prepare": "node ./scripts/create-base-files.js",
     "lint": "eslint",

+ 1 - 1
src/http/http.ts

@@ -24,7 +24,7 @@ export function http<T>(options: CustomRequestOptions) {
         // 状态码 2xx,参考 axios 的设计
         if (res.statusCode >= 200 && res.statusCode < 300) {
           // 2.1  处理业务逻辑错误
-          const { code = 0, message = '', data = null } = res.data as IResponse<T>
+          const { code = 0, message = '', msg = '', data = null } = res.data as IResponse<T>
           // 0和200当做成功都很普遍,这里直接兼容两者,见 ResultEnum
           if (code !== ResultEnum.Success0 && code !== ResultEnum.Success200) {
             throw new Error(`请求错误[${code}]:${message || msg}`)

+ 2 - 0
src/pages/about/about.vue

@@ -3,6 +3,7 @@ import { isApp, isAppAndroid, isAppHarmony, isAppIOS, isAppPlus, isH5, isMpWeixi
 import { LOGIN_PAGE } from '@/router/config'
 import { useTokenStore } from '@/store'
 import { tabbarStore } from '@/tabbar/store'
+import RequestOpenApiComp from './components/request-openapi.vue'
 import RequestComp from './components/request.vue'
 import VBindCss from './components/VBindCss.vue'
 
@@ -111,6 +112,7 @@ onShow(() => {
     <button class="mt-4 w-60 text-center" @click="setTabbarBadge">
       设置tabbarBadge
     </button>
+    <RequestOpenApiComp />
     <RequestComp />
     <VBindCss />
     <view class="mb-6 h-1px bg-#eee" />

+ 61 - 0
src/pages/about/components/request-openapi.vue

@@ -0,0 +1,61 @@
+<script lang="ts" setup>
+import type { UserItem } from '@/service'
+import { infoUsingGet } from '@/service/info'
+
+const loading = ref(false)
+const error = ref<Error | null>(null)
+const data = ref<UserItem>()
+
+async function getUserInfo() {
+  try {
+    loading.value = true
+    const res = await (await infoUsingGet({})).promise
+    console.log(res)
+    data.value = res
+    error.value = null
+  }
+  catch (err) {
+    error.value = err as Error
+    data.value = null
+  }
+  finally {
+    loading.value = false
+  }
+}
+const { data: data2, loading: loading2, run } = useRequest(() => infoUsingGet({}), {
+  immediate: false,
+})
+</script>
+
+<template>
+  <view class="p-6 text-center">
+    <view class="my-4 text-center">
+      1)直接使用 openapi 生成的请求
+    </view>
+    <view class="my-4 text-center">
+      <button type="primary" size="mini" class="w-160px" @click="getUserInfo">
+        发送请求
+      </button>
+      <view class="text-xl">
+        请求数据如下
+      </view>
+      <view class="text-green leading-8">
+        {{ JSON.stringify(data) }}
+      </view>
+    </view>
+    <view class="my-4 text-center">
+      2)直接使用 openapi + useRequest 生成的请求
+    </view>
+    <view class="my-4 text-center">
+      <button type="primary" size="mini" class="w-160px" @click="run">
+        发送请求
+      </button>
+      <view class="text-xl">
+        请求数据如下
+      </view>
+      <view class="text-green leading-8">
+        {{ JSON.stringify(data2) }}
+      </view>
+    </view>
+  </view>
+</template>

+ 0 - 13
src/service/displayEnumLabel.ts

@@ -1,13 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import * as API from './types';
-
-export function displayStatusEnum(field: API.StatusEnum) {
-  return { available: 'available', pending: 'pending', sold: 'sold' }[field];
-}
-
-export function displayStatusEnum2(field: API.StatusEnum2) {
-  return { placed: 'placed', approved: 'approved', delivered: 'delivered' }[
-    field
-  ];
-}

+ 2 - 4
src/service/index.ts

@@ -1,8 +1,6 @@
 /* eslint-disable */
 // @ts-ignore
 export * from './types';
-export * from './displayEnumLabel';
 
-export * from './pet';
-export * from './store';
-export * from './user';
+export * from './listAll';
+export * from './info';

+ 18 - 0
src/service/info.ts

@@ -0,0 +1,18 @@
+/* eslint-disable */
+// @ts-ignore
+import request from '@/http/vue-query';
+import { CustomRequestOptions } from '@/http/types';
+
+import * as API from './types';
+
+/** 用户信息 GET /user/info */
+export async function infoUsingGet({
+  options,
+}: {
+  options?: CustomRequestOptions;
+}) {
+  return request<API.UserItem>('/user/info', {
+    method: 'GET',
+    ...(options || {}),
+  });
+}

+ 18 - 0
src/service/listAll.ts

@@ -0,0 +1,18 @@
+/* eslint-disable */
+// @ts-ignore
+import request from '@/http/vue-query';
+import { CustomRequestOptions } from '@/http/types';
+
+import * as API from './types';
+
+/** 用户列表 GET /user/listAll */
+export async function listAllUsingGet({
+  options,
+}: {
+  options?: CustomRequestOptions;
+}) {
+  return request<API.UserItem[]>('/user/listAll', {
+    method: 'GET',
+    ...(options || {}),
+  });
+}

+ 0 - 185
src/service/pet.ts

@@ -1,185 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import request from '@/http/vue-query';
-import { CustomRequestOptions } from '@/http/types';
-
-import * as API from './types';
-
-/** Update an existing pet PUT /pet */
-export async function petUsingPut({
-  body,
-  options,
-}: {
-  body: API.Pet;
-  options?: CustomRequestOptions;
-}) {
-  return request<unknown>('/pet', {
-    method: 'PUT',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Add a new pet to the store POST /pet */
-export async function petUsingPost({
-  body,
-  options,
-}: {
-  body: API.Pet;
-  options?: CustomRequestOptions;
-}) {
-  return request<unknown>('/pet', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Find pet by ID Returns a single pet GET /pet/${param0} */
-export async function petPetIdUsingGet({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.PetPetIdUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  const { petId: param0, ...queryParams } = params;
-
-  return request<API.Pet>(`/pet/${param0}`, {
-    method: 'GET',
-    params: { ...queryParams },
-    ...(options || {}),
-  });
-}
-
-/** Updates a pet in the store with form data POST /pet/${param0} */
-export async function petPetIdUsingPost({
-  params,
-  body,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.PetPetIdUsingPostParams;
-  body: API.PetPetIdUsingPostBody;
-  options?: CustomRequestOptions;
-}) {
-  const { petId: param0, ...queryParams } = params;
-
-  return request<unknown>(`/pet/${param0}`, {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/x-www-form-urlencoded',
-    },
-    params: { ...queryParams },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Deletes a pet DELETE /pet/${param0} */
-export async function petPetIdUsingDelete({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.PetPetIdUsingDeleteParams;
-  options?: CustomRequestOptions;
-}) {
-  const { petId: param0, ...queryParams } = params;
-
-  return request<unknown>(`/pet/${param0}`, {
-    method: 'DELETE',
-    params: { ...queryParams },
-    ...(options || {}),
-  });
-}
-
-/** uploads an image POST /pet/${param0}/uploadImage */
-export async function petPetIdUploadImageUsingPost({
-  params,
-  body,
-  file,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.PetPetIdUploadImageUsingPostParams;
-  body: API.PetPetIdUploadImageUsingPostBody;
-  file?: File;
-  options?: CustomRequestOptions;
-}) {
-  const { petId: param0, ...queryParams } = params;
-  const formData = new FormData();
-
-  if (file) {
-    formData.append('file', file);
-  }
-
-  Object.keys(body).forEach((ele) => {
-    const item = (body as { [key: string]: any })[ele];
-
-    if (item !== undefined && item !== null) {
-      if (typeof item === 'object' && !(item instanceof File)) {
-        if (item instanceof Array) {
-          item.forEach((f) => formData.append(ele, f || ''));
-        } else {
-          formData.append(ele, JSON.stringify(item));
-        }
-      } else {
-        formData.append(ele, item);
-      }
-    }
-  });
-
-  return request<API.ApiResponse>(`/pet/${param0}/uploadImage`, {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'multipart/form-data',
-    },
-    params: { ...queryParams },
-    data: formData,
-    ...(options || {}),
-  });
-}
-
-/** Finds Pets by status Multiple status values can be provided with comma separated strings GET /pet/findByStatus */
-export async function petFindByStatusUsingGet({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.PetFindByStatusUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return request<API.Pet[]>('/pet/findByStatus', {
-    method: 'GET',
-    params: {
-      ...params,
-    },
-    ...(options || {}),
-  });
-}
-
-/** Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. GET /pet/findByTags */
-export async function petFindByTagsUsingGet({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.PetFindByTagsUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return request<API.Pet[]>('/pet/findByTags', {
-    method: 'GET',
-    params: {
-      ...params,
-    },
-    ...(options || {}),
-  });
-}

+ 0 - 72
src/service/store.ts

@@ -1,72 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import request from '@/http/vue-query';
-import { CustomRequestOptions } from '@/http/types';
-
-import * as API from './types';
-
-/** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
-export async function storeInventoryUsingGet({
-  options,
-}: {
-  options?: CustomRequestOptions;
-}) {
-  return request<Record<string, number>>('/store/inventory', {
-    method: 'GET',
-    ...(options || {}),
-  });
-}
-
-/** Place an order for a pet POST /store/order */
-export async function storeOrderUsingPost({
-  body,
-  options,
-}: {
-  body: API.Order;
-  options?: CustomRequestOptions;
-}) {
-  return request<API.Order>('/store/order', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Find purchase order by ID For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions GET /store/order/${param0} */
-export async function storeOrderOrderIdUsingGet({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.StoreOrderOrderIdUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  const { orderId: param0, ...queryParams } = params;
-
-  return request<API.Order>(`/store/order/${param0}`, {
-    method: 'GET',
-    params: { ...queryParams },
-    ...(options || {}),
-  });
-}
-
-/** Delete purchase order by ID For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors DELETE /store/order/${param0} */
-export async function storeOrderOrderIdUsingDelete({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.StoreOrderOrderIdUsingDeleteParams;
-  options?: CustomRequestOptions;
-}) {
-  const { orderId: param0, ...queryParams } = params;
-
-  return request<unknown>(`/store/order/${param0}`, {
-    method: 'DELETE',
-    params: { ...queryParams },
-    ...(options || {}),
-  });
-}

+ 16 - 337
src/service/types.ts

@@ -1,350 +1,29 @@
 /* eslint-disable */
 // @ts-ignore
 
-export type ApiResponse = {
-  code?: number;
-  type?: string;
-  message?: string;
+export type InfoUsingGetResponse = {
+  code: number;
+  msg: string;
+  data: UserItem;
 };
 
-export type Category = {
-  id?: number;
-  name?: string;
+export type InfoUsingGetResponses = {
+  200: InfoUsingGetResponse;
 };
 
-export type Order = {
-  id?: number;
-  petId?: number;
-  quantity?: number;
-  shipDate?: string;
-  /** Order Status */
-  status?: 'placed' | 'approved' | 'delivered';
-  complete?: boolean;
+export type ListAllUsingGetResponse = {
+  code: number;
+  msg: string;
+  data: UserItem[];
 };
 
-export type Pet = {
-  id?: number;
-  category?: Category;
-  name: string;
-  photoUrls: string[];
-  tags?: Tag[];
-  /** pet status in the store */
-  status?: 'available' | 'pending' | 'sold';
+export type ListAllUsingGetResponses = {
+  200: ListAllUsingGetResponse;
 };
 
-export type PetFindByStatusUsingGetParams = {
-  /** Status values that need to be considered for filter */
-  status: ('available' | 'pending' | 'sold')[];
-};
-
-export type PetFindByStatusUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: Pet[];
-  /**
-   * Invalid status value
-   */
-  400: unknown;
-};
-
-export type PetFindByTagsUsingGetParams = {
-  /** Tags to filter by */
-  tags: string[];
-};
-
-export type PetFindByTagsUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: Pet[];
-  /**
-   * Invalid tag value
-   */
-  400: unknown;
-};
-
-export type PetPetIdUploadImageUsingPostBody = {
-  /** Additional data to pass to server */
-  additionalMetadata?: string;
-  /** file to upload */
-  file?: string;
-};
-
-export type PetPetIdUploadImageUsingPostParams = {
-  /** ID of pet to update */
-  petId: number;
-};
-
-export type PetPetIdUploadImageUsingPostResponses = {
-  /**
-   * successful operation
-   */
-  200: ApiResponse;
-};
-
-export type PetPetIdUsingDeleteParams = {
-  /** Pet id to delete */
-  petId: number;
-};
-
-export type PetPetIdUsingDeleteResponses = {
-  /**
-   * Invalid ID supplied
-   */
-  400: unknown;
-  /**
-   * Pet not found
-   */
-  404: unknown;
-};
-
-export type PetPetIdUsingGetParams = {
-  /** ID of pet to return */
-  petId: number;
-};
-
-export type PetPetIdUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: Pet;
-  /**
-   * Invalid ID supplied
-   */
-  400: unknown;
-  /**
-   * Pet not found
-   */
-  404: unknown;
-};
-
-export type PetPetIdUsingPostBody = {
-  /** Updated name of the pet */
-  name?: string;
-  /** Updated status of the pet */
-  status?: string;
-};
-
-export type PetPetIdUsingPostParams = {
-  /** ID of pet that needs to be updated */
-  petId: number;
-};
-
-export type PetPetIdUsingPostResponses = {
-  /**
-   * Invalid input
-   */
-  405: unknown;
-};
-
-export type PetUsingPostResponses = {
-  /**
-   * Invalid input
-   */
-  405: unknown;
-};
-
-export type PetUsingPutResponses = {
-  /**
-   * Invalid ID supplied
-   */
-  400: unknown;
-  /**
-   * Pet not found
-   */
-  404: unknown;
-  /**
-   * Validation exception
-   */
-  405: unknown;
-};
-
-export enum StatusEnum {
-  'available' = 'available',
-  'pending' = 'pending',
-  'sold' = 'sold',
-}
-
-export type IStatusEnum = keyof typeof StatusEnum;
-
-export enum StatusEnum2 {
-  'placed' = 'placed',
-  'approved' = 'approved',
-  'delivered' = 'delivered',
-}
-
-export type IStatusEnum2 = keyof typeof StatusEnum2;
-
-export type StoreInventoryUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: Record<string, number>;
-};
-
-export type StoreOrderOrderIdUsingDeleteParams = {
-  /** ID of the order that needs to be deleted */
-  orderId: number;
-};
-
-export type StoreOrderOrderIdUsingDeleteResponses = {
-  /**
-   * Invalid ID supplied
-   */
-  400: unknown;
-  /**
-   * Order not found
-   */
-  404: unknown;
-};
-
-export type StoreOrderOrderIdUsingGetParams = {
-  /** ID of pet that needs to be fetched */
-  orderId: number;
-};
-
-export type StoreOrderOrderIdUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: Order;
-  /**
-   * Invalid ID supplied
-   */
-  400: unknown;
-  /**
-   * Order not found
-   */
-  404: unknown;
-};
-
-export type StoreOrderUsingPostResponses = {
-  /**
-   * successful operation
-   */
-  200: Order;
-  /**
-   * Invalid Order
-   */
-  400: unknown;
-};
-
-export type Tag = {
-  id?: number;
-  name?: string;
-};
-
-export type User = {
-  id?: number;
-  username?: string;
-  firstName?: string;
-  lastName?: string;
-  email?: string;
-  password?: string;
-  phone?: string;
-  /** User Status */
-  userStatus?: number;
-};
-
-export type UserCreateWithArrayUsingPostBody = User[];
-
-export type UserCreateWithArrayUsingPostResponses = {
-  /**
-   * successful operation
-   */
-  default: unknown;
-};
-
-export type UserCreateWithListUsingPostBody = User[];
-
-export type UserCreateWithListUsingPostResponses = {
-  /**
-   * successful operation
-   */
-  default: unknown;
-};
-
-export type UserLoginUsingGetParams = {
-  /** The user name for login */
+export type UserItem = {
+  userId: number;
   username: string;
-  /** The password for login in clear text */
-  password: string;
-};
-
-export type UserLoginUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: string;
-  /**
-   * Invalid username/password supplied
-   */
-  400: unknown;
-};
-
-export type UserLogoutUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  default: unknown;
-};
-
-export type UserUsernameUsingDeleteParams = {
-  /** The name that needs to be deleted */
-  username: string;
-};
-
-export type UserUsernameUsingDeleteResponses = {
-  /**
-   * Invalid username supplied
-   */
-  400: unknown;
-  /**
-   * User not found
-   */
-  404: unknown;
-};
-
-export type UserUsernameUsingGetParams = {
-  /** The name that needs to be fetched. Use user1 for testing.  */
-  username: string;
-};
-
-export type UserUsernameUsingGetResponses = {
-  /**
-   * successful operation
-   */
-  200: User;
-  /**
-   * Invalid username supplied
-   */
-  400: unknown;
-  /**
-   * User not found
-   */
-  404: unknown;
-};
-
-export type UserUsernameUsingPutParams = {
-  /** name that need to be updated */
-  username: string;
-};
-
-export type UserUsernameUsingPutResponses = {
-  /**
-   * Invalid user supplied
-   */
-  400: unknown;
-  /**
-   * User not found
-   */
-  404: unknown;
-};
-
-export type UserUsingPostResponses = {
-  /**
-   * successful operation
-   */
-  default: unknown;
+  nickname: string;
+  avatar: string;
 };

+ 0 - 150
src/service/user.ts

@@ -1,150 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import request from '@/http/vue-query';
-import { CustomRequestOptions } from '@/http/types';
-
-import * as API from './types';
-
-/** Create user This can only be done by the logged in user. 返回值: successful operation POST /user */
-export async function userUsingPost({
-  body,
-  options,
-}: {
-  body: API.User;
-  options?: CustomRequestOptions;
-}) {
-  return request<unknown>('/user', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Get user by user name GET /user/${param0} */
-export async function userUsernameUsingGet({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.UserUsernameUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  const { username: param0, ...queryParams } = params;
-
-  return request<API.User>(`/user/${param0}`, {
-    method: 'GET',
-    params: { ...queryParams },
-    ...(options || {}),
-  });
-}
-
-/** Updated user This can only be done by the logged in user. PUT /user/${param0} */
-export async function userUsernameUsingPut({
-  params,
-  body,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.UserUsernameUsingPutParams;
-  body: API.User;
-  options?: CustomRequestOptions;
-}) {
-  const { username: param0, ...queryParams } = params;
-
-  return request<unknown>(`/user/${param0}`, {
-    method: 'PUT',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    params: { ...queryParams },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Delete user This can only be done by the logged in user. DELETE /user/${param0} */
-export async function userUsernameUsingDelete({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.UserUsernameUsingDeleteParams;
-  options?: CustomRequestOptions;
-}) {
-  const { username: param0, ...queryParams } = params;
-
-  return request<unknown>(`/user/${param0}`, {
-    method: 'DELETE',
-    params: { ...queryParams },
-    ...(options || {}),
-  });
-}
-
-/** Creates list of users with given input array 返回值: successful operation POST /user/createWithArray */
-export async function userCreateWithArrayUsingPost({
-  body,
-  options,
-}: {
-  body: API.UserCreateWithArrayUsingPostBody;
-  options?: CustomRequestOptions;
-}) {
-  return request<unknown>('/user/createWithArray', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Creates list of users with given input array 返回值: successful operation POST /user/createWithList */
-export async function userCreateWithListUsingPost({
-  body,
-  options,
-}: {
-  body: API.UserCreateWithListUsingPostBody;
-  options?: CustomRequestOptions;
-}) {
-  return request<unknown>('/user/createWithList', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    data: body,
-    ...(options || {}),
-  });
-}
-
-/** Logs user into the system GET /user/login */
-export async function userLoginUsingGet({
-  params,
-  options,
-}: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.UserLoginUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return request<string>('/user/login', {
-    method: 'GET',
-    params: {
-      ...params,
-    },
-    ...(options || {}),
-  });
-}
-
-/** Logs out current logged in user session 返回值: successful operation GET /user/logout */
-export async function userLogoutUsingGet({
-  options,
-}: {
-  options?: CustomRequestOptions;
-}) {
-  return request<unknown>('/user/logout', {
-    method: 'GET',
-    ...(options || {}),
-  });
-}