UNPKG

@kubb/plugin-client

Version:

API client generator plugin for Kubb, creating type-safe HTTP clients (Axios, Fetch) from OpenAPI specifications for making API requests.

30 lines (26 loc) 944 B
/* eslint-disable no-alert, no-console */ /** * Generated by Kubb (https://kubb.dev/). * Do not edit manually. */ import fetch from 'axios' import type { RequestConfig, ResponseErrorConfig } from 'axios' export function getFindPetsByTagsUrl() { const res = { method: 'GET', url: `/pet/findByTags` as const } return res } /** * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @summary Finds Pets by tags * {@link /pet/findByTags} */ export async function findPetsByTags(params?: FindPetsByTagsQueryParams, config: Partial<RequestConfig> & { client?: typeof fetch } = {}) { const { client: request = fetch, ...requestConfig } = config const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({ method: 'GET', url: getFindPetsByTagsUrl().url.toString(), params, ...requestConfig, }) return res.data }