Closed ivenuss closed 1 year ago
-t, --template <path> Template path for the handlebars template that will be used to generate the output
endpoints
are available under the api
property of every zodios client, which means you can do :
import { api } from './generated';
const endpoints = api.api; // a bit weird name clash here 🤷
![Screenshot 2023-01-30 at 09 51 21](https://user-images.githubusercontent.com/47224540/215430435-d600fe21-cb2b-4ecb-964a-97a29c387b60.png)
- finally, we could just add an option for the 3rd arg in the exported fn `createApiClient`
![Screenshot 2023-01-30 at 09 52 35](https://user-images.githubusercontent.com/47224540/215430718-105e0b51-15c1-4703-838a-be6adaef0f46.png)
Glad to hear that the new createApiClient
comes with this option. This totally solves my problem.
Thanks!
Hi,
I would like to configure the
axiosConfig
, but I'm not able to do that without touching the generated file, which I don't want to. I want to keep it as source of truth to prevent future overrides.This the solution that I came up with, but requires
export
ing theendpoints
variable. Is there any better solution?