---
lang: en
title: 'API docs: metadata.methodmultidecoratorfactory'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.methodmultidecoratorfactory.html
---

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

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [MethodMultiDecoratorFactory](./metadata.methodmultidecoratorfactory.md)

## MethodMultiDecoratorFactory class

Factory for an append-array of method-level decorators The  metadata for a method is an array. Each item in the array should be a single value, containing a response code and a single spec or Model. This should allow:

```ts
 @response(200, MyFirstModel)
 @response(403, [NotAuthorizedReasonOne, NotAuthorizedReasonTwo])
 @response(404, NotFoundOne)
 @response(404, NotFoundTwo)
 @response(409, {schema: {}})
 public async myMethod() {}

```
In the case that a ResponseObject is passed, it becomes the default for description/content, and if possible, further Models are incorporated as a `oneOf: []` array.

In the case that a ReferenceObject is passed, it and it alone is used, since references can be external and we cannot `oneOf` their content.

The factory creates and updates an array of items T\[\], and the getter provides the values as that array.

<b>Signature:</b>

```typescript
export declare class MethodMultiDecoratorFactory<T> extends MethodDecoratorFactory<T[]> 
```

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [mergeWithInherited(inheritedMetadata, target, methodName)](./metadata.methodmultidecoratorfactory.mergewithinherited.md) |  |  |
|  [mergeWithOwn(ownMetadata, target, methodName, methodDescriptor)](./metadata.methodmultidecoratorfactory.mergewithown.md) |  |  |


