Closed realwoopee closed 7 months ago
Fixed in 15.10.5
Now npm run generate-axios-minimal
fails using "react-query-swagger": "15.10.6"
:
> pet-client-vue@0.0.0 generate-axios-minimal
> react-query-swagger /vue /minimal /input:https://petstore.swagger.io/v2/swagger.json /output:src/api/axios-client-minimal.ts /template:Axios /serviceHost:.
node:fs:3025
binding.copyFile(
^
Error: ENOENT: no such file or directory, copyfile 'C:\Users\Woopee\Desktop\pet-client-vue\node_modules\react-query-swagger\templates_minimal_vue\modules\AxiosClient.liquid' -> 'C:\Users\Woopee\Desktop\pet-client-vue\node_modules\react-query-swagger\templates_minimal_vue\_AxiosClient.liquid'
at copyFileSync (node:fs:3025:11)
at Object.<anonymous> (C:\Users\Woopee\Desktop\pet-client-vue\node_modules\react-query-swagger\cli.js:138:1)
at Module._compile (node:internal/modules/cjs/loader:1375:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
at node:internal/main/run_main_module:28:49 {
errno: -4058,
code: 'ENOENT',
syscall: 'copyfile',
path: 'C:\\Users\\Woopee\\Desktop\\pet-client-vue\\node_modules\\react-query-swagger\\templates_minimal_vue\\modules\\AxiosClient.liquid',
dest: 'C:\\Users\\Woopee\\Desktop\\pet-client-vue\\node_modules\\react-query-swagger\\templates_minimal_vue\\_AxiosClient.liquid'
}
Node.js v21.5.0
Should be better now in 15.10.7 (files were not included in the npm bundle)
Works now, thank you!
Can be reproduced using
pet-client-vue
example usingreact-query-swagger 15.10.4
. Just add/minimal
flag in thegenerate-axios
script and run it.ApiResponse
class inaxios-client.ts
if not using/minimal
flag:ApiResponse
class inaxios-client.types.ts
if using/minimal
flag:As you can see,
init()
andtoJson()
methods are broken