walling / gulp-raml2html

A simple RAML to HTML documentation generator, wrapped for Gulp.
MIT License
21 stars 23 forks source link

can't read included file while parsing raml in subdir #1

Closed merlinran closed 10 years ago

merlinran commented 10 years ago

Didn't fix it yet, just modified test to reveal the issue.

CLI raml2html api/example.raml -o api/example.haml works. but test will fail

  1) gulp-raml2html in buffer mode can convert an example RAML file:
     Uncaught Error: api/example.raml:215:12: Parse error while reading included.raml: cannot read included.raml (Error: ENOENT, open 'included.raml')
      at /Users/merlin/workspace/gulp-raml2html/index.js:26:16
      at process._tickCallback (node.js:415:13)

As per the RAML spec

If a relative path is used for the included file, the path is interpreted relative to the location of the original (including) file. If the original file is fetched as an HTTP resource, the included file SHOULD be fetched over HTTP.

walling commented 10 years ago

Sorry for the delay! Thanks for the test case.