Closed goganchic closed 8 years ago
There is only one comment. In talking about fixed
, MSON spec says this.
Individual [Nested Member Types][] MAY override inherited behavior from a
fixed
inherited type by using anoptional
attribute and/or MAY indicate values are samples using a [Variable Value][].- person (object, fixed) - `first_name` - `last_name` (optional)
Implies a "value object" that MUST contain the property "first_name" and MAY contain the property "last_name".
- colors (array, fixed) - red - *green*
Implies an
array
type structure that MUST contain "red" as an item and MAY contain any other strings, where "green" is a sample value.
You should add something like this for fixed-type
too.
Unfortunately I do not understand what comment should I add for fixed-type. fixed
is inheritable, so you can overrride it in some places with optional
keyword, but fixed-type
is unheritable, so there is nothing to comment about override of this keyword I think.
Sorry about that. Got confused for a bit. Never mind that comment.
This will be merged when drafter with fixed-type
support is released.
Thanks for your contribution!
Before merging I'd like to see reasoning on https://github.com/apiaryio/mson/pull/67/files#r74749674 also I'd like to see using the same terminology as rest of the specification to avoid any disambiguation (internal data structure vs nested member type).
Can we merge this and fix the lingo separately? Otherwise this will lay around for weeks just because somebody has to learn the slang.
@w-vi We do not merge this until drafter is released with this change.
OK.
@w-vi
Otherwise this will lay around for weeks just because somebody has to learn the slang.
The "slang" is one thing. But I am missing the reasoning about
fixed
) @zdne
The reason being the flexibility I want array of User objects but I don't want to impose constraints on the User object just because I want it in an array, you can specify any constraints on the User object directly.
Is this not enough for clarification why it is not propagated?
Agree that the examples are not sufficient and are possible by other means although I don't think that examples need to be unique.
Merging since this is released in drafter 3.1.0
based on https://github.com/apiaryio/mson/issues/66