raml-java-parser icon indicating copy to clipboard operation
raml-java-parser copied to clipboard

Custom facets throw exception if included in chain

Open nchursin opened this issue 8 years ago • 0 comments

I got this message trying to parse my API definition.

{
      ErrorNode [Custom facet 'my-facet' cannot be set as it is already defined by object.]
}

Here are my RAML files: CustomType.raml:

#%RAML 1.0 DataType
type: object
facets: 
  my-facet: string

CustomObject.raml:

#%RAML 1.0 DataType
type: !include CustomType.raml
my-facet: 'text'

API.raml:

#%RAML 1.0
title: Test
types:
  CustomObject: !include CustomObject.raml

If I use inline definition everything works fine. Also RAML API Designer handles this stuff fine, so I believe it's an issue. To reproduce this I just executed the sample code from README

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

nchursin avatar Jul 04 '17 13:07 nchursin