mulesoft-labs / rajapa

Other
0 stars 2 forks source link

Inheritance: Wrong validation when two types share same property #36

Closed eleonoraortega closed 8 years ago

eleonoraortega commented 8 years ago

Using the following example:

#%RAML 1.0
title: My API With Types
types:
  Phone:
    type: object
    properties:
      manufacturer:
        type: string
      numberOfSIMCards:
        type: number
  Notebook:
    type: object
    properties:
      manufacturer:
        type: string
      numberOfUSBPorts:
        type: number
  Device:
    type: Phone | Notebook
    properties:
      weight: 
        type: number

The parser validates property 'manufacturer' and tries to merge properties from both types (Phone and Notebook)

- property definition {manufacturer:string} overrides existing property: {manufacturer:string} [line=14, col=7]