Q:

Correct way to define an array of one or more strings using the OpenAPI v3 Specification

I wish to POST an array containing a variable number of strings, such as 

["string1", "string2", ... "stringN"]

My present OpenAPI document defines it this way:
schema:
  type: array
    items:
      description: networkIds
      type: string

Is this the correct way to code to the OpenAPi v3 spec, or is there a more precise way to indicate one or more strings within the array?

A:

The indentation is wrong – type and items must be on the same level.
If the array cannot be empty and always has at least 1 item, you can add minItems: 1 as an additional constraint. If all items must be unique, add uniqueItems: true.
schema:
  type: array
  items:
    description: networkIds
    type: string
  minItems: 1

