Open sichvoge opened 7 years ago
In your example you use: TemperatureSensorEvent | TemperatureSensorEvent
so it should validate against
TemperatureSensorEvent
type and it will not pass validation.
If you will change TemperatureSensorEvent | TemperatureSensorEvent
to TemperatureSensorEvent | HumiditySensortEvent
then it will validate against HumiditySensortEvent
and should pass validation with a warning about unknown property temperature
Regards, Pavel
OH, sorry the example should be TemperatureSensorEvent | HumiditySensortEvent
. My mistake. @petrochenko-pavel-a can you also explain why it does validate against HumiditySensortEvent
?
It has every HumiditySensortEvent required property and one additional property which is not defined in HumiditySensortEvent as we all agreed RAML types are open by default , but in examples we are marking unknown properties as warnings.
Regards, Pavel
Assume we have the following type definitions:
And the following example:
What should be the type this example validates against? TemperatureSensorEvent or HumiditySensortEvent? Is this example above valid or not?