desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Cannot validate enum in array of strings

Open ozum opened this issue 7 years ago • 0 comments

Hi,

In Stoplight Desktop v4.4.0, it is impossible to add enum validation to array of string. (For each element of array)

Endpoint Query Parameters

Example code:

          {
            "in": "query",
            "name": "embed",
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["a", "b"]
            }
          }

screen shot 2018-09-06 at 16 54 41

Models

Example code:

            "embed": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": ["a", "b"]
              }
            }

Enum in below screenshot is related to parent (main) type, not elements of array.

image

Kind Regards,

ozum avatar Sep 06 '18 14:09 ozum