thebinarypenguin/raml-cop

Cannot read property 'absolutePath' of null

Closed this issue · 2 comments

I believe there is a problem parsing !include statements. Here's some example RAML for testing:

api.raml

#%RAML 1.0
title: AwesomeAPI
version: v1
baseUri: https://awesome.api
mediaType: application/json

types:
  UUID: !include UUID.raml

UUID.raml

#%RAML 1.0 DataType
displayName: Universally Unique Identifier
type: string
example: 9922f203-641e-4e60-9729-78547f67b68b
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Some output from raml-cop

root@0ed10435642d:/raml# raml-cop UUID.raml 
[UUID.raml] VALID

root@0ed10435642d:/raml# raml-cop api.raml 
[api.raml] Cannot read property 'absolutePath' of null

I think this should be taken care of now. And the Sublime Text plugin too.