You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_modules/swagger-jsdoc/src/specification.js:141 for (const definition of Object.keys(annotation[property])) Cannot convert undefined or null to object
#289
Open
daniel-aluna opened this issue
Dec 13, 2021
· 2 comments
when I run npm run start to test my api docs in localhost:3100 I get the following error:
Not all input has been taken into account at your final specification.
Here's the report:
YAMLSemanticError: Implicit map keys need to be on a single line at line 3, column 5:
tags:[Auth]
^^^^^^^^^^^…
,YAMLSyntaxError: All collection items must start at the same column at line 3, column 5:
tags: [Auth]
^^^^^^^^^^^^…
,YAMLSemanticError: Implicit map keys need to be followed by map values at line 4, column 5:
tags:[Auth]
^^^^^^^^^^^
,YAMLSemanticError: Implicit map keys need to be on a single line at line 3, column 5:
tags:[Auth]
^^^^^^^^^^^…
,YAMLSemanticError: Implicit map keys need to be on a single line at line 3, column 5:
tags:[Auth]
^^^^^^^^^^^…
,YAMLSemanticError: Implicit map keys need to be followed by map values at line 4, column 5:
tags:[Auth]
^^^^^^^^^^^
,YAMLSemanticError: Implicit map keys need to be followed by map values at line 4, column 5:
tags:[Auth]
^^^^^^^^^^^
,YAMLSyntaxError: All collection items must start at the same column at line 2, column 3:
post:
^^^^^…
YAMLSemanticError: Nested mappings are not allowed in compact mappings at line 4, column 18:
description: To create invitation for organization.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
YAMLSemanticError: Implicit map keys need to be on a single line at line 4, column 18:
description: To create invitation for organization.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
,YAMLSemanticError: Nested mappings are not allowed in compact mappings at line 19, column 22:
description: Some properties are missing: pui, noteType, noteText, isPr…
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
/Users/danielcortes/Aluna-Projects/nimbus/node_modules/swagger-jsdoc/src/specification.js:141
for (const definition of Object.keys(annotation[property])) {
^
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at organize (/Users/danielcortes/Aluna-Projects/nimbus/node_modules/swagger-jsdoc/src/specification.js:141:37)
at build (/Users/danielcortes/Aluna-Projects/nimbus/node_modules/swagger-jsdoc/src/specification.js:278:7)
at Object.module.exports [as default] (/Users/danielcortes/Aluna-Projects/nimbus/node_modules/swagger-jsdoc/src/lib.js:31:10)
at SwaggerConfig.registerSwaggerPage (/Users/danielcortes/Aluna-Projects/nimbus/dist/common/swagger.config.js:53:52)
at Object.<anonymous> (/Users/danielcortes/Aluna-Projects/nimbus/dist/app.js:157:46)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
I am wondering if it is due to this configuration:
Ive had the same issue, for me it was a syntax error in the js doc. wish there was a way to identify them better like maybe a vscode plugin for swagger-jsdoc.
might work on it after i'm done with my current project
Describe the bug
when I run
npm run start
to test my api docs inlocalhost:3100
I get the following error:I am wondering if it is due to this configuration:
Even though it was working before with the above configuration.
To Reproduce
registerSwaggerPage()
similar to how you see it above inside ofswagger.config.ts
file.Expected behavior
I expect that when I run
npm run start
I do not get the above error.Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: