discriminatorValue not recognized if declared in sub-sub-type (warning)
leflamm opened this issue · 1 comments
leflamm commented
Hi,
it seems like discriminatorValue
s 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"
}
}
carowright commented
Hi @leflamm!
This is fixed in version 0.4.9.