Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants