title: How to accept an array parameter in a GET request in Flask using Connexion
body: <p>I am using connexion to create a REST API via Flask.  At the moment I am passing a single identifier in.</p>
  <pre><code>/read/maa_valid_product_id/{drug_product_id}:
      get:
        operationId: registrations.read_maa_valid_product_id
        tags:
          - Marketing Applications
        summary: Read the entire list of non-passive marketing application registrations for a specified drug_product_id, which have a valid authorisation status
        description: Read the entire list of non-passive marketing application registrations for a specified drug_product_id, which have a valid authorisation status
        parameters:
          - in: path
            name: drug_product_id
            required: true
            schema:
              type: integer
            description: Numeric ID of the user to get
          - in: query
            name: length
            required: false
            schema:
              type: integer
            description: Numeric ID of the user to get
          - in: query
            name: offset
            required: false
            schema:
              type: integer
            description: Numeric ID of the user to get
        responses:
          '200':
            description: Successfully commpleted the list operation for non-passive valid MAAs, for the specified drug_product_id
            content:
              application/json:
                schema:
                  type: array
                  items:
                    $ref: '#/components/schemas/marketing_application'
  </code></pre>
  <p>I need to pass an array of id values in, based on selections in a table.  Is this possible?</p>
  <p>If it is possible, how would I access the array, the existing method call is:</p>
  <pre><code>def read_maa_valid_product_id(drug_product_id, length=0, offset=0):
      &quot;&quot;&quot;
      This function responds to a request for /api/products
      with the complete lists of people
  
      :return:        json string of list of people
      &quot;&quot;&quot;
      # conn_ariel = pool.acquire()
      conn_ariel = get_connection()
      cursor_ariel = conn_ariel.cursor()
  
  
      # Create the list of products from our data
      sql = &quot;&quot;&quot;
          SELECT A.DRUG_PRODUCT_ID, 
                 B.PREFERRED_TRADE_NAME, 
                 B.PRODUCT_LINE, 
                 B.PRODUCT_TYPE, 
                 B.FLAG_PASSIVE AS PRODUCT_FLAG_PASSIVE,
                 A.REGISTRATION_UID,
                 A.COUNTRY_DISPLAY_LABEL,
                 A.FLAG_PASSIVE,
                 A.AUTHORIZATION_STATUS,
                 A.DISTRIBUTION_TYPE AS PROCEDURE_TYPE,
                 A.MAH_COMPANY,
                 A.DOSSIER_REF_NUMBER AS REGISTRATION_NAME_DETAILS,
                 A.APPLICATION_STAGE,
                 A.APPLICATION_TYPE,
                 A.RENEWAL_NOT_REQUIRED,
                 TO_CHAR(A.NEXT_RENEWAL_DATE,'YYYY-MM-DD') AS NEXT_RENEWAL_DATE
  
                 FROM DIM_REGISTRATION_SET A, DIM_DRUG_PRODUCT B, v_rep_az_183_01_reg_includes C
                 WHERE A.DRUG_PRODUCT_ID = B.DRUG_PRODUCT_ID AND A.VERSION_SEQ = C.VERSION_SEQ
                 AND A.DATA_STATE = 'C'
                 AND A.FLAG_PASSIVE = '0'
                 AND A.APPLICATION_TYPE = 'Marketing Application'
                 AND A.AUTHORIZATION_STATUS LIKE 'Valid%'
                 AND A.DRUG_PRODUCT_ID = :id
                 ORDER BY B.PREFERRED_TRADE_NAME, A.COUNTRY_DISPLAY_LABEL ASC
          &quot;&quot;&quot;
      cursor_ariel.execute(sql,{&quot;id&quot;:drug_product_id})
      registrations = []
      names = [c[0] for c in cursor_ariel.description]
      cursor_ariel.rowfactory = collections.namedtuple(&quot;registrations&quot;, names)
  
      i = 0
      j = 0
  
      start = None
  
      if offset == 0:
          start = True
      else:
          start = False
  
      for row in cursor_ariel.fetchall():
          if start == True:
              registration = {
                  &quot;drug_product_id&quot;: row.DRUG_PRODUCT_ID,
                  &quot;preferred_trade_name&quot;: row.PREFERRED_TRADE_NAME,
                  &quot;product_line&quot;: row.PRODUCT_LINE,
                  &quot;product_type&quot;: row.PRODUCT_TYPE,
                  &quot;product_flag_passive&quot;: row.PRODUCT_FLAG_PASSIVE,
                  &quot;registration_uid&quot;: row.REGISTRATION_UID,
                  &quot;country_display_label&quot;: row.COUNTRY_DISPLAY_LABEL,
                  &quot;flag_passive&quot;: row.FLAG_PASSIVE,
                  &quot;authorization_status&quot;: row.AUTHORIZATION_STATUS,
                  &quot;procedure_type&quot;: row.PROCEDURE_TYPE,
                  &quot;mah_company&quot;: row.MAH_COMPANY,
                  &quot;registration_name_details&quot;: row.REGISTRATION_NAME_DETAILS,
                  &quot;application_stage&quot;: row.APPLICATION_STAGE,
                  &quot;application_type&quot;: row.APPLICATION_TYPE,
                  &quot;renewal_not_required&quot;: row.RENEWAL_NOT_REQUIRED,
                  &quot;next_renewal_date&quot;: row.NEXT_RENEWAL_DATE
              }
              # logging.info(&quot;Adding Registration: %r&quot;, registration)
              registrations.append(registration)
  
              if length &gt; 0:
                  if i == length - 1:
                      break
              i += 1
          else:
              if j == offset - 1:
                  start = True
  
          j += 1
  
      pool.release(conn_ariel)
  
      return registrations
  </code></pre>