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

0 stars 0 forks source link

Typo in section Runtime Polymorphism (Discriminators) #53

Closed VasiliyLysokobylko closed 8 years ago

VasiliyLysokobylko commented 8 years ago

If I understand discriminators correctly there is a typo in one example.

#%RAML 1.0 
title: My API With Types
types:
  Person:
    type: object
    discriminator: kind
    properties:
      name: string
      kind: string
  Employee:
    type: Person
    discriminatorValue: employee
    properties:
      employeeId: string
  User:
    type: Person
    discriminatorValue: person <<< user
    properties:
      userId: string
#%RAML 1.0 
data:
  - name: A User
    userId: 111
    kind: user
  - name: An Employee
    employeeId: 222
    kind: employee

I believe the discriminatorValue for class User shall be user not person.

VasiliyLysokobylko commented 8 years ago

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