every jsdoc annotation is being ignored?
See original GitHub issueevery 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",
* }
*/
router.post('/', [insertNewTag])
config:
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)
./routes/**/*.*
while this one is not:
./**/*.ts
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.Hi @kevinccbsg . Thanks for kind reply.
after I digging up, I realized that my project are required to add
@types/swagger-ui-express
for recognizeallOf
orexpress-jsdoc-swagger
’s own property.seems like it just happy coincidence, but… at least it works for now.
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
orcodecompletion
working perfectly on .js, but .ts files got ton of error…can you help me what is going on?