apiaryio / mson

Markdown Syntax for Object Notation
MIT License
903 stars 180 forks source link

Is there a way how to reuse enum Members declaration? #82

Closed honzatrtik closed 7 years ago

honzatrtik commented 7 years ago

I'd like to be as DRY as possible and do not replicate enum Members Is something like this possible to do in MSON:

## TypeEnum (enum[string])
+ Members
  + `type_1`
  + `type_2`
  + `type_3`

## SomeObject (object)
+ `type_name` (TypeEnum, required)

## SomeOtherObject (object)
+ `other_type_name` (TypeEnum, required)

Thanks!

pksunkara commented 7 years ago

Yes, this is valid MSON.

pksunkara commented 7 years ago

You will have to use ## Members though.

honzatrtik commented 7 years ago

Oh, I see! Thanks for the explanation!