mohsen1 / multi-file-swagger-example

Multi-file Swagger example
http://azimi.me/2015/07/16/split-swagger-into-smaller-files.html
168 stars 39 forks source link

On NPM + Usable globally. #14

Closed iain17 closed 7 years ago

iain17 commented 7 years ago

A few changes that allow this example to be installed globally on a dev machine and the yaml file specified over a parameter. Instead of previously being always index.yaml and requiring a working copy of the code inside of index.js in every project.

People can now just install and try it out.

mohsen1 commented 7 years ago

This is a major refactor and appreciate it! If you add me to npm package admins I will merge this. My npm user name is mohsen.

Also, this will require a major version bump. If we can update the dependencies it would be great!

Thanks!

iain17 commented 7 years ago

Done. I added your account on npm, hope its okay now. Did a major version bump and updated the deps. Thanks for the blog/example 👍

mohsen1 commented 7 years ago

Thanks a lot! I think JSON Refs API has changes and this line won't work anymore. It gets the root under definition key now. I can merge it tonight and fix it if you don't have time.

iain17 commented 7 years ago

Seems to work fine? Using the 2.0 version right now and it's generating the proper json files. Even the definitions look good to me. Also resolveRefs is still being exported in the latest versions of the JSON Refs API. You might be confusing it with resolveRefsAt.