6

My supposed solution for parameters section is

+ fields: [firstField, secondField] (array[enum], optional)
  + Members
      + firstField
      + secondField
      + extraField
      + dummyField

But it failed on semantic error:

The example value [firstField, secondField] of parameter fields is not in its list of expected values

Robin Green
  • 32,079
  • 16
  • 104
  • 187

1 Answers1

8

I tried to understand your needs and wish for syntax of your API Blueprint.

One of possible solutions in MSON syntax as I see it is probably down below:

- fields (array, optional)
    - (enum)
        - firstField
        - secondField
        - extraField
        - dummyField

Hope it helps and solves your Array of Enum thing.

Jakub Koral
  • 368
  • 4
  • 10
  • This does not work for Parameters, only for Attributes. It seems like the most you can do is specify array[string] as the type, not nest it this much. – fgblomqvist Apr 11 '18 at 04:04
  • Yes. Parameters are meant to be used for URI Template (Resource URL) definitions. – Jakub Koral Apr 27 '18 at 16:09