Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Error parsing: while validating trait properties resource type cannot define child resources #178

Open
priyavivek1 opened this issue Apr 29, 2016 · 1 comment

Comments

@priyavivek1
Copy link

"Error parsing: while validating trait properties
resource type cannot define child resources". I am getting this error while parsing RAML using raml-js-parser.

Seems to be working fine in Java but getting this issues in Javascript one.

Sample RAML:

/abc:
type: Sample
description: individual-to-party relationships

  • Sample:
    is: []
    .<>
    /{key}: Key is child resources here to Sample resource Type
    is: []
    .<>

It throws following error

Error parsing: while validating trait properties
resource type cannot define child resources
in "1.1.4/ramlName", line 690, column 7:
/{key}:
^

Seems RAML specification is correct as per RAML0.8 but parser gives errror

@dmartinezg
Copy link

What the error is saying is that a resource type or trait MAY NOT have a child resource inside.

Without the full RAML, it is hard to pinpoint the exact syntax error, but in Sample (which is a resource type), you are defining a /{key} child resource.

If you can provide a small, full RAML example with the error, it may be easier to point you to the syntax error.

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

No branches or pull requests

2 participants