Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with deep directories #91

Closed
alexisab opened this issue Sep 6, 2017 · 1 comment
Closed

Problem with deep directories #91

alexisab opened this issue Sep 6, 2017 · 1 comment

Comments

@alexisab
Copy link

alexisab commented Sep 6, 2017

Hi,

swagger-jsdoc doesn't generate the documentation for files in "deep" directories. I don't know if it's a bug from glob or swagger-jsdoc.

Here is my file structure :

.
|- scripts/
|
| - src/
|    |
|    | - controllers/
|    |    |
|    |    | - projects/
|    |    |    |
|    |    |    | - index.js
|    |    |
|    |    | - index.js

I have added commands in my package.json file

"doc": "swagger-jsdoc -d scripts/swaggerDef.js -o ../documentation/public/swagger.json ./src/**/*.js",
"doc:watch": "yarn run doc -- -w"

And here is my swaggerDef.js file :

const packageJson = require('../package.json')

const tagNames = 'blueprint invitation notification org ' +
    'project-tag user project task'

const tags = tagNames
                .split(' ')
                .map(name => {
                    return {
                        name,
                    }
                })

module.exports = {
    info: {
        title: 'Clovis API',
        version: packageJson.version,
        description: 'Official Clovis API documentation.',
    },
    host: 'localhost:3009',
    tags,
}

When I run swagger-jsdoc only src/controllers/index.js is processed, not src/controller/projects/index.js

I run the yarn run doc from the root of my project.

@Aarbel
Copy link

Aarbel commented Mar 15, 2018

Any answers ? Thanks a lot for your help @chdanielmueller @kalinchernev @devlouisc @fliptoo ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants