npx @fgrzl/fetch-gen --input openapi.yaml --output ./src/adapters/generated.ts{
"scripts": {
"gen:api": "npx @fgrzl/fetch-gen --input ./openapi.yaml --output ./src/adapters/generated.ts"
}
}import { createAdapter } from './adapters/generated';
import client from '@fgrzl/fetch';
client.setBaseUrl('https://api.example.com');
const api = createAdapter(client);
const res = await api.getUser({ id: '1' });
if (res.ok) console.log(res.data);npx @fgrzl/fetch-gen --input openapi.yaml --output ./src/api.ts --instance ./src/customPass a module that exports your preconfigured FetchClient (middleware, auth, retry).