karlvr / openapi-generator-plus

A code generator for OpenAPI written in node and designed to have pluggable generators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Missing schema type in schema: {}

gustawdaniel opened this issue · comments

Docs of openapi allow for syntax

An array of arbitrary types can be defined as:

type: array
items: {}

[ "hello", -2, true, [5.7], {"id": 5} ]

but this app throws an exception

Failed to process the API specification: Error: Missing schema type in schema: {}
    at toCodegenSchemaTypeFromApiSchema (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/schema-type.js:68:15)
    at toCodegenSchema (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/index.js:99:75)
    at toCodegenSchemaUsage (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/index.js:68:24)
    at toCodegenArraySchema (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/array.js:20:67)
    at toCodegenSchema (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/index.js:160:55)
    at toCodegenSchemaUsage (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/index.js:68:24)
    at toCodegenProperty (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/property.js:80:53)
    at toCodegenProperties (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/property.js:45:26)
    at handleObjectCommon (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/object.js:103:60)
    at toCodegenObjectSchemaObject (/home/daniel/pro/sportsbase/node_modules/.pnpm/@openapi-generator-plus+core@2.9.0_openapi-types@12.1.3/node_modules/@openapi-generator-plus/core/dist/process/schema/object.js:49:14)

I am using generator: @openapi-generator-plus/typescript-fetch-client-generator2