Closed Vaelor closed 6 years ago
It makes sense @Vaelor. A PR would be appreciated :).
Great :-) I will get on it as soon as I can :-)
So, just throwing config.data.swagger
in there as swagger
(so it can be used the same as in the other files as @root.swagger.endpoints
for example) in there does seem to work without any further complications.
Will make a PR later today then, when I had a chance to check it more thorough.
I'm closing this issue as #31 has been merged. Thanks @Vaelor!
I just did a release and published to npm: https://github.com/fmvilas/swagger-node-codegen/releases/tag/1.3.0.
Thanks a lot! :)
I currently have a case where it would make my life easier if I had access to other parts of the swagger spec (like
components
) in an operation file (___.js
). The only context I have there is 'operation'.Do you think it makes sense to include that there? (if I happen to have the time for it, I could also implement it)
I would assume https://github.com/fmvilas/swagger-node-codegen/blob/master/lib/codegen.js#L76 would be a place to start (next to operation also provide the whole openapi object, so existing implementations wouldn't break ofc)