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

'uses' not recognised when type treated as inline type on property #572

Open
tapina opened this issue Dec 4, 2018 · 0 comments
Open

'uses' not recognised when type treated as inline type on property #572

tapina opened this issue Dec 4, 2018 · 0 comments

Comments

@tapina
Copy link

tapina commented Dec 4, 2018

Parsing validation fails if your RAML has the following structure:

Top level

%RAML 1.0
..
types:
  mytype:
    type: !include types/mytype.raml

Data type

%RAML 1.0 DataType
uses:
  mylib: ../../lib.raml

type: object
properties:
  myproperty: !include myproperty.raml
...

Property type

%RAML 1.0 DataType
uses:
  mylib: ../../lib.raml

...

Validation failed saying that uses is unexpected.

This is because the property type is treated as purely inline rather than an external type declaration and so 'uses' is not an expected field.

See the attached patch for a fix.
fix_uses.patch.txt

Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-44

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

1 participant