Closed Znack closed 9 years ago
What I'm trying to do is get the routes and generate Swagger spec. But I'm being unable to find how to list all blueprint routes.
The routes are stored in sails.router._privateRouter.routes
@tjwebb The route below repeat several times (aprox. 5~6 time) for different methods in my testing application, I did something wrong or is this normal?
{ path: '/*',
method: 'post',
callbacks: [ [Function: routeTargetFnWrapper] ],
keys: [],
regexp: /^\/(.*)\/?$/i }
I haven't looked at it any closer, but could https://github.com/lbovet/docson#swagger be on the right track?
Hi everyone! I'm trying to connect waterline models in my sails project and swagger definitions for avoiding the duplications in models' properties. My main idea is converting waterline's "attributes" property to valid swagger doc. For example, we have this object defined in
models/User.js
And after converting we would be able automagically get something like:
I didn't manage to find something appropriate among this projects: https://github.com/swagger-api/swagger-spec#nodejs If there is no such tool anywhere I will be happy to create first basic version :)
Thanks.