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

Supporting multiple paths with CLI? #66

Closed
tot-ra opened this issue Mar 31, 2017 · 1 comment
Closed

Supporting multiple paths with CLI? #66

tot-ra opened this issue Mar 31, 2017 · 1 comment

Comments

@tot-ra
Copy link

tot-ra commented Mar 31, 2017

Is it possible to watch multiple directories when executing swagger-jsdoc from CLI?
Currently have to resort to writing custom script and executing it with node like this..

var swaggerJSDoc = require('swagger-jsdoc');
var options = {
	swaggerDefinition: {
		info: {
			title: 'API',
			version: '1.0.0',
			description: '',
		},
		host: 'https://api.xxx.com', // Host (optional)
		basePath: '/v1', // Base path (optional)
	},
	apis: ['apps/controllers/*.js', 'apps/entities/*.js'],
};
var swaggerSpec = swaggerJSDoc(options);
require('fs').writeFile('api.json', JSON.stringify(swaggerSpec, null, 4));
@kalinchernev
Copy link
Contributor

Hi @tot-ra
I tried to put files from 2 folders, it worked correctly:

screenshot from 2017-03-31 09-10-41

Please double check paths - relative to the current working directory of cli executor.

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