Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

every jsdoc annotation is being ignored?

See original GitHub issue

every jsdoc annotations are being ignored:


 * POST /tag
 * @summary create a tag
 * @param {string} name the name fo the new tag
 * @returns {object} 200 - success response
 * @returns {object} 400 - Bad request response
 * @example response - 200 - success response example
 *   {
 *     "_id": "Bury the light",
 *     "name": "lorem ipsum",
 *   }
 */'/', [insertNewTag])


const swaggerSettings = {
	info: {
		version: '1.0.0',
		title: 'PetStore',
		license: {
			name: 'MIT',
	security: {
		BasicAuth: {
			type: 'http',
			scheme: 'basic',
	baseDir: __dirname,
	filesPattern: ['./routes/**/*.*'],
	swaggerUIPath: '/api-docs',
	exposeSwaggerUI: true,
	exposeApiDocs: false,
	apiDocsPath: '/v3/api-docs',
	notRequiredAsNullable: false,
	swaggerUiOptions: {},

Also notice the filepattern. This works (well nothing really is being rendered from the jsdoc)


while this one is not:


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

kevinccbsgcommented, Jun 8, 2021

Hi, @juicycool92 we are not very used to TS but related to Intelisense I think it is not working because this is not a valid JSDOC comment. So IntelliSense will not recognize this.

* @typedef {anyof|oneof|object} example

I don’t think we could do a lot about this error 😅 We are using JSDOC as a friendly format to easily create API Docs but OpenAPI has way more scenarios that cannot be covered with JSDOC specification (For example anyof|oneof) so we have to create structures that don’t match JSDOC spec. Therefore, intelisense will not work in this case.

juicycool92commented, Jun 7, 2021

Hi @kevinccbsg . Thanks for kind reply.

after I digging up, I realized that my project are required to add @types/swagger-ui-express for recognize allOf or express-jsdoc-swagger’s own property.

seems like it just happy coincidence, but… at least it works for now.

image but unfortunately, I did not resolve another issues that define variables in @typedef is not recognized yet.

I copied ts-example for just in case that example is working, but seems like no luck.

its work… but make me itching that intellisense or codecompletion working perfectly on .js, but .ts files got ton of error…

can you help me what is going on?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use JSDoc: @ignore
Overview. The @ignore tag indicates that a symbol in your code should never appear in the documentation. This tag takes precedence over all...
Read more >
Multiple JSDoc Annotations on Same Line Ignored · Issue #1484
"Block tags always begin with an at sign (@). Each block tag must be followed by a line break, with the exception of...
Read more >
JSDoc - How to document a parameter that is being ignored ...
I have the following code: const renderRightActions = (_, dragX) => { const trans = dragX.interpolate({ inputRange: [0, 50, 100, 101], ...
Read more >
JSDoc Reference - TypeScript: Documentation
If it is off, then number is nullable. Unsupported tags. TypeScript ignores any unsupported JSDoc tags. The following tags have open issues to...
Read more >
Working with JavaScript in Visual Studio Code
json project. For the details of how JavaScript IntelliSense works, including being based on type inference, JSDoc annotations, TypeScript declarations, and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found