petrochenko-pavel-a / raml-js-parser2-issues

0 stars 0 forks source link

Remove Polymorphism section in favour for a better description for `discriminator` and `discriminatorValue` #8

Closed VasiliyLysokobylko closed 8 years ago

VasiliyLysokobylko commented 8 years ago

The current RC1 section about Runtime Polymorphism (Discriminators) is actually not needed anymore in RC2.

For RC2, it's enough to add a bit more description for discriminator and discriminatorValue.


Name Type Description
discriminator string The value must correspond to a name of one of the properties that are defined inside a type declaration. The discriminator facet can not be defined for inline type declarations and should only be used for scalar-valued properties.
discriminatorValue string You may use discriminatorValue facet if a type also defined the discriminator facet. The value of this facet should be a valid value of the property with the name equal to the value of discriminator facet; and its being used to identify the declaring type. This value should be unique in the hierarchy of the type.

Default: the name of the type where the discriminator is applied to
VasiliyLysokobylko commented 8 years ago

https://github.com/raml-org/raml-spec/issues/330