mulesoft/api-designer

discriminatorValue not recognized if declared in sub-sub-type (warning)

leflamm opened this issue · 1 comments

Hi,
it seems like discriminatorValues are not recognized if declared in a sub-sub-type (neither default nor explicitly defined).

api-designer rises warning:
WARNING: None of the 'A' type known subtypes declare 'C' as discriminating property 'kind'.

#%RAML 1.0
title: foo

types:
 
  HasA:
    type: object
    properties: 
      x: A
    examples:
      exA: !include bar/A.json
      exB: !include bar/B.json
      exC: !include bar/C.json # <<< api-designer warns at this line

  A:
    type: object
    discriminator: kind
    properties: 
      kind: string
      
  B:
    type: A
    
  C:
    type: B

example file bar/A.json

{
  "x" : {
    "kind" : "A"
  }
}

example file bar/B.json

{
  "x" : {
    "kind" : "B"
  }
}

example file bar/C.json

{
  "x" : {
    "kind" : "C"
  }
}

Hi @leflamm!
This is fixed in version 0.4.9.