drafter
drafter copied to clipboard
MSON - Members vs. Items vs. Properties
@klokane opened apiaryio/snowcrash#330
in MSON spec 4.1.2 https://github.com/apiaryio/mson/blob/master/MSON%20Specification.md#421-member-type-separator is written:
Member Type Separator → Items | Members | Properties
Array Structures - MUST use Items for a Member Type Separator
Enum Structures - MUST use Members for a Member Type Separator
Object Structures - MUST use Properties for a Member Type Separator
But implementation in snowcrash it does not handle strictly:
object
- allows
Properties
- disallow
Memebers
&&Items
array && enum
- allows both
Members
&&Items
- disallow
Properties
example for parser https://gist.github.com/klokane/405aa50eaa157b8808d2
Based on discuss with @zdne there is proposal change
MSON Specification 4.2.1
all MUST to SHOULD
Snowcrash Implementation
Accept (optionaly with warning) all variants of Member Type Separator for all types of Stucture types while parsing