---
lang: en
title: 'API docs: openapi-v3.param.array'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/openapi-v3
permalink: /doc/en/lb4/apidocs.openapi-v3.param.array.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [param](./openapi-v3.param.md) &gt; [array](./openapi-v3.param.array.md)

## param.array() function

Define a parameter of `array` type.

**Signature:**

```typescript
array: (name: string, source: ParameterLocation, itemSpec: SchemaObject | ReferenceObject) => (target: object, member: string, index: number) => void
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

name


</td><td>

string


</td><td>

Parameter name


</td></tr>
<tr><td>

source


</td><td>

ParameterLocation


</td><td>

Source of the parameter value


</td></tr>
<tr><td>

itemSpec


</td><td>

SchemaObject \| ReferenceObject


</td><td>

Item type for the array or the full item object


</td></tr>
</tbody></table>

**Returns:**

(target: object, member: string, index: number) =&gt; void

## Example


```ts
export class MyController {
  @get('/greet')
  greet(@param.array('names', 'query', {type: 'string'}) names: string[]): string {
    return `Hello, ${names}`;
  }
}
```


