fork of hey-api/openapi-ts because I need some additional things
at main 20 lines 849 B view raw
1// This file is auto-generated by @hey-api/openapi-ts 2 3import { type ClientOptions, type Config, createClient, createConfig } from './client' 4import type { ClientOptions as ClientOptions2 } from './types.gen' 5 6/** 7 * The `createClientConfig()` function will be called on client initialization 8 * and the returned object will become the client's initial configuration. 9 * 10 * You may want to initialize your client this way instead of calling 11 * `setConfig()`. This is useful for example if you're using Next.js 12 * to ensure your client always has the correct values. 13 */ 14export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = ( 15 override?: Config<ClientOptions & T> 16) => Config<Required<ClientOptions> & T> 17 18export const client = createClient( 19 createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }) 20)