Closed MrWako closed 9 years ago
This was hard coded, yuck. Thanks.
Fixed in generator-swaggerize@1.0.0-alpha.10
great thanks.
Just installed the latest version via npm, I think the "./" might have gone missing from the config path. I'm currently getting
api: require('config/swagger.json')
rather than
api: require('./config/swagger.json')
Only minor, thanks.
Hi folks, thanks for creating the generator-swaggerize package, it was just what I was looking for. Spotted a couple of small things that I thought you might be interested in - I'll log them as separate issues.
So if I take a copy of https://raw.githubusercontent.com/wordnik/swagger-spec/master/examples/v2.0/json/petstore.json and save it locally, changing the name to api.json. Then I run the generator (latest version installed from source code rather than npm package) the index.js file expects to find pets.json, not api.json.
app.use(swaggerize({ api: require('./config/pets.json'), handlers: './handlers' }));
Thanks.