Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Unable to resolve type' error #393

Closed
KevinMitchell opened this issue Jan 30, 2017 · 3 comments
Closed

'Unable to resolve type' error #393

KevinMitchell opened this issue Jan 30, 2017 · 3 comments

Comments

@KevinMitchell
Copy link

Suppose I define a datatype Customer in a test library; the details aren’t important.

I then define a collection resource type as

#%RAML 1.0 ResourceType

get?:
  responses:
    200:
      body:
        application/json:
          type: <<typeName>>[]

post?:
  body:
    application/json:
      type: <<typeName>>

Finally, in my main file I define

...
resourceTypes:
  collection: !include resources/collection.raml

/customers:
  type: { collection: {typeName : test.Customer } }
  #get:

With the get: commented out I get

[error] Reference: ‘test.Customer’ can not be resolved.

If I uncomment the get: it’s happy, i.e. it manages to resolve the type. I’ve encountered a number of problems in this area, sometimes generating this error, sometimes displaying nothing at all. Hopefully they all have the same root cause...

@sichvoge
Copy link
Contributor

sichvoge commented Feb 7, 2017

Might that be a parser problem instead of the console?

@nmarinel01
Copy link

nmarinel01 commented Feb 8, 2017

raml-org/raml-js-parser-2#640
To verify when parser issue is closed

@carowright
Copy link
Contributor

Fix available in v3.0.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants