Comments (6)
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.
from express-jsdoc-swagger.
Hi @zilahir I see the problem 🤔 I don't usually work with Typescript but in this PR #154 we add an example with the way you can configure your instance for your dev scripts ts-node
and your build script after you run the tsc
.
The file pattern must match both js and ts file.
'./simple.{ts,js}'
I hope that helps 😄
from express-jsdoc-swagger.
I'm closing this due to inactivity after we provide a new release with a solution and example. Feel free to re-open in case the error persists or create a new issue. 😄
from express-jsdoc-swagger.
its working with new solution.
But my Webstorm IDE's Code completion
or
VsCode IDE's intellisense
are not recognize variables of typedef
or allOf|anyOf|oneOf
etc...
what am i missing?
below codes are my setting of express-jsdoc-swagger
export const options = {
info: {
version: '1.0.0',
title: 'PROJECT_TITLE',
license: {
name: 'MIT',
},
},
security: {
BasicAuth: {
type: 'http',
scheme: 'basic',
},
},
baseDir: __dirname,
// Glob pattern to find your jsdoc files (multiple patterns can be added in an array)
filesPattern: [ '../../**/*.{ts,js}', '../../**/*.d.ts' ], // Glob pattern to find your jsdoc files
// URL where SwaggerUI will be rendered
swaggerUIPath: '/api-docs',
// Expose OpenAPI UI
exposeSwaggerUI: true,
// Expose Open API JSON Docs documentation in `apiDocsPath` path.
exposeApiDocs: true,
// Open API JSON Docs endpoint.
apiDocsPath: '/v3/api-docs',
// Set non-required fields as nullable by default
notRequiredAsNullable: false,
// You can customize your UI options.
// you can extend swagger-ui-express config. You can checkout an example of this
// in the `example/configuration/swaggerOptions.js`
swaggerUiOptions: {},
};
I installed 1.6.2
version in this case :>
Thanks.
from express-jsdoc-swagger.
Hi @juicycool92, It is not going to show in your IDE as I think intellisense
is expecting a JSDOC format. As you might see in our docs page, we are using a similar format but not the same format as JSDOC because OpenAPI/Swagger has more options that are not part of the JSDOC specification. Therefore, you'll see that issue in your IDE.
Your question was related to this issue I think #120
from express-jsdoc-swagger.
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.
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?
from express-jsdoc-swagger.
Related Issues (20)
- How to use with Express Router
- Syntax for specifying JSON object fields and nested objects in one place HOT 3
- Format is missing in response HOT 1
- Security template for Cookie
- Add support for `@augments`/`@extends` tag HOT 2
- Allow specifying global security schema for all routes HOT 3
- Add support for OAS 3 callback documentation
- [BUG] Unable to render this definition HOT 1
- Authorization Header [BUG] HOT 3
- Theme? HOT 1
- import file contained typedef is not recognized HOT 2
- [BUG] Unable to render this definition (production) HOT 1
- Adding Typescript Schema types into the comments HOT 3
- Adding REQUEST Header for Apis HOT 2
- express-jsdoc-swagger sometimes fails generating code HOT 2
- [BUG] Cannot generate example using media type = application/problem+json
- [BUG] enum does not support integer type
- elastic beanstalk fails swagger with timeout
- Upgrade `glob` dependency to >= v10
- Support @ start symbol in property definition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-jsdoc-swagger.