The raml-js-parser fails to parse the !include examples/<<resourcePathName>>-200.json part.
I expect it to include the example in the file examples/users-200.json for example. The RAML file should be valid as I am also using RAML Java Parser and it works just fine - it parses the RAML files without errors and also generates service interfaces out of it. The error that I get with raml-js-parser is:
...
[19:01:56] Plumber found unhandled error:
Error in plugin 'gulp-raml2html'
Message: .... cannot read examples/%3C%3CresourcePathName%3E%3E-200.json (Error: ENOENT, open 'examples/%3C%3CresourcePathName%3E%3E-200.json'). I guess that the value of the 'example' property is not expanded properly. Workaround would be to pass the contents of the example as a parameter but I wanted to avoid that - I don't want to specify it explicitly for each resource.
This type of inclusion is not working in a resource type.
I have a master file for resource types which I include in the main RAML file as
resourceTypes: !include resource-types.raml
In the
resource-types.raml
file I have the following definition:The raml-js-parser fails to parse the
!include examples/<<resourcePathName>>-200.json
part. I expect it to include the example in the fileexamples/users-200.json
for example. The RAML file should be valid as I am also using RAML Java Parser and it works just fine - it parses the RAML files without errors and also generates service interfaces out of it. The error that I get with raml-js-parser is:... [19:01:56] Plumber found unhandled error: Error in plugin 'gulp-raml2html' Message: .... cannot read examples/%3C%3CresourcePathName%3E%3E-200.json (Error: ENOENT, open 'examples/%3C%3CresourcePathName%3E%3E-200.json'). I guess that the value of the 'example' property is not expanded properly. Workaround would be to pass the contents of the example as a parameter but I wanted to avoid that - I don't want to specify it explicitly for each resource.