Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I define array of enums in API blueprint

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

like image 845
Martin Tomec Avatar asked Sep 07 '15 14:09

Martin Tomec


1 Answers

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.

like image 141
Jakub Koral Avatar answered Nov 06 '22 09:11

Jakub Koral