Closed mort3za closed 4 years ago
I am using API v3 and everything is working fine so far. I am using swagger-axios-codegen
v. 0.9.12.
Could you please check if that version is working for you?
@fairking Tried 0.9.12, returns this error:
error TypeError: Expected the input to be `string | string[]`
at Object.camelCase [as default] (/home/***/www/***/node_modules/camelcase/index.js:34:9)
at Object.requestTemplate (/home/***/www/***/node_modules/swagger-axios-codegen/src/templates/template.ts:204:55)
at /home/***/www/***/node_modules/swagger-axios-codegen/src/index.ts:205:19
at Array.forEach (<anonymous>)
at /home/***/www/***/node_modules/swagger-axios-codegen/src/index.ts:203:18
at Array.forEach (<anonymous>)
at /home/***/www/***/node_modules/swagger-axios-codegen/src/index.ts:201:22
at Generator.next (<anonymous>)
at fulfilled (/home/***/www/***/node_modules/swagger-axios-codegen/dist/index.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
finish: 2262.249ms
(node:29601) UnhandledPromiseRejectionWarning: TypeError: Expected the input to be `string | string[]`
at Object.camelCase [as default] (/home/***/www/***/node_modules/camelcase/index.js:34:9)
at Object.requestTemplate (/home/***/www/***/node_modules/swagger-axios-codegen/src/templates/template.ts:204:55)
at /home/***/www/***/node_modules/swagger-axios-codegen/src/index.ts:205:19
at Array.forEach (<anonymous>)
at /home/***/www/***/node_modules/swagger-axios-codegen/src/index.ts:203:18
at Array.forEach (<anonymous>)
at /home/***/www/***/node_modules/swagger-axios-codegen/src/index.ts:201:22
at Generator.next (<anonymous>)
at fulfilled (/home/***/www/***/node_modules/swagger-axios-codegen/dist/index.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:29601) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:29601) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@mort3za
The request dose not has operationId on your swagger spec .
Please set options.methodNameMode:path
or generate operationId
Hi, After updating our API to openApi 3, this tool is not working anymore. The output error is:
My codegen config is:
This is the Swagger page: https://api-ctyar.fandogh.cloud/index.html