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

0 stars 0 forks source link

Mechanism to allow question mark in data type property names #16

Closed VasiliyLysokobylko closed 8 years ago

VasiliyLysokobylko commented 8 years ago

When the required facet on a property is specified explicitly in a type definition, any question mark in its property name is treated as part of the property name rather than as an indicator that the property is optional.

For example, in

types:
  profile:
    properties:
      preference?:
        required: true

the profile type has a property whose name is preference? (including the trailing question mark) and that is required. The same property could be made optional in two equivalent ways:

types:
  profile:
    properties:
      preference?:
        required: false

or

types:
  profile:
    properties:
      preference??:
VasiliyLysokobylko commented 8 years ago

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

petrochenko-pavel-a commented 8 years ago

Already implemented in type system