Body and response types should be exported
localhosted opened this issue · comments
localhosted commented
Because the types aren't exported we have to resort to manually doing some ungodly type shenanigans like:
export type DashboardList = Awaited<
ReturnType<typeof api.dashboardList>
>['data']['item'];
export type AdminProductListParams = Parameters<typeof adminApi.productList>[0];
Having to do this mannually defeates the purpose of auto generating from swagger
ecyrbe commented
They are utility types, check the docs : https://www.zodios.org/docs/api/typescript