Skip to content

Exception: Cannot convert undefined or null to object in routingControllersToSpec #155

@kkmurthyt21

Description

@kkmurthyt21

I do see below exception in routingControllersToSpec after I upgraded routing-controllers-openapi from 4.0.0 to 5.0.0

TypeError: Cannot convert undefined or null to object
[1]     at hasOwnProperty (<anonymous>)
[1]     at Object.isSchemaObject (/app/node_modules/routing-controllers-openapi/node_modules/openapi3-ts/dist/cjs/model/OpenApi.js:30:45)
[1]     at getQueryParams (/app/node_modules/routing-controllers-openapi/build/generateSpec.js:127:16)
[1]     at getOperation (/app/node_modules/routing-controllers-openapi/build/generateSpec.js:29:16)
[1]     at /app/node_modules/routing-controllers-openapi/build/generateSpec.js:52:34
[1]     at Array.map (<anonymous>)
[1]     at getPaths (/app/node_modules/routing-controllers-openapi/build/generateSpec.js:50:31)
[1]     at getSpec (/app/node_modules/routing-controllers-openapi/build/generateSpec.js:220:16)
[1]     at routingControllersToSpec (/app/node_modules/routing-controllers-openapi/build/index.js:14:45)
[1]     at generateOpenApiSpec (/app/dist/utils/apiDoc.js:41:79)

@QueryParms() looks broken in controllers-openapi@5.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions