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

Swagger path #6

Closed
mangvlad opened this issue Mar 21, 2013 · 1 comment
Closed

Swagger path #6

mangvlad opened this issue Mar 21, 2013 · 1 comment

Comments

@mangvlad
Copy link

It looks like swagger path is hard codded to api-docs.json.
Any way to make it configurable so api-docs or v1/api-docs can be used instead?

Thanks.

@feugy
Copy link
Contributor

feugy commented Mar 21, 2013

I'm currently working on it: you'll be able to set your own descriptor path when adding the generator middleware on your express application:

var app = express();
app.use(express.cookieParser())
  .use(express.methodOverride())
  .use(express.bodyParser())
  .use(swagger.generator(
    app, 
    {apiVersion: '1.0', ...}, 
    [{api: require('./api.yml'), controller: require('./controller')}], 
    {descPath: '/v1/api-docs'}
  ));

Stay tunned for version 1.4.0 !

@feugy feugy closed this as completed in 4b41ef2 Mar 21, 2013
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