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

Current version of json-refs does not work with the existing code #6

Closed floydpink closed 8 years ago

floydpink commented 8 years ago

As discussed in #5, there seems to be breaking changed introduced in json-refs v2.0 that makes the resolution to not work.

The changes to update the dependencies as seen at https://github.com/floydpink/multi-file-swagger-example/commit/3b13c6c4844020d635788ed6db15e60d0ef37228, gives this output:

hari@MBP multi-file-swagger-example (master) $ npm start

> multi-file-swagger-example@1.0.0 start /Users/hari/Source/multi-file-swagger-example
> node resolve.js

{
  "swagger": "2.0",
  "info": {
    "$ref": "./info/index.yaml"
  },
  "paths": {
    "$ref": "./paths/index.yaml"
  },
  "definitions": {
    "$ref": "./definitions/index.yaml"
  }
}
hari@MBP multi-file-swagger-example (master) $

Rather than to get it fixed, I am raising this for the awareness of anyone trying it out with updated dependencies. But it will be good to understand what changed on json-refs and how to get it resolved as well.

mohsen1 commented 8 years ago

Changes: https://github.com/whitlockjc/json-refs/blob/master/RELEASE_NOTES.md#v200-2016-01-06

A PR is welcome to fix this.

floydpink commented 8 years ago

Thanks for the pointer to the release notes - submitted the PR #7 with the updates.