openapistack / openapicmd

The CLI for all things OpenAPI and Swagger
https://openapistack.co
MIT License
55 stars 9 forks source link

Error while generating types #35

Closed leobaldoneto closed 1 year ago

leobaldoneto commented 1 year ago

Hi, thanks for the project!

I'm trying to generate types with bellow command, but I'm getting an error using the latest release.

npx openapicmd typegen https://developer.bling.com.br/build/assets/openapi-d5b45145.json > src/types/bling-openapi.d.ts

> npx openapicmd typegen bling-openapi-definition.json > src/types/bling-openapi.d.ts

DeprecationWarning: 'createTypeAliasDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter.
DeprecationWarning: 'createModuleDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter.
DeprecationWarning: 'createInterfaceDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter.
Error: unknown type: int
    at Object.toTSType (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/utils.js:33:19)
    at DtsGenerator.generateTypeName (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:431:30)
    at DtsGenerator.generateType (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:415:25)
    at DtsGenerator.generateTypeProperty (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:306:25)
    at DtsGenerator.generateArrayTypeProperty (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:367:31)
    at DtsGenerator.generateTypeName (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:450:25)
    at DtsGenerator.generateType (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:415:25)
    at DtsGenerator.generateTypeProperty (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:306:25)
    at DtsGenerator.generateProperties (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:258:84)
    at DtsGenerator.generateDeclareType (/home/leo/.nvm/versions/node/v18.15.0/lib/node_modules/openapi-client-axios-typegen/node_modules/@anttiviljami/dtsgenerator/dist/core/dtsGenerator.js:232:34)