@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
50 lines (34 loc) • 2.06 kB
Markdown
---
lang: en
title: 'API docs: metadata.methodmultidecoratorfactory'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/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) > [/metadata](./metadata.md) > [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:
<b>Signature:</b>
```typescript
export declare class MethodMultiDecoratorFactory<T> extends MethodDecoratorFactory<T[]>
```
<b>Extends:</b> [MethodDecoratorFactory](./metadata.methoddecoratorfactory.md)<!-- --><T\[\]>
## Example
```ts
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.
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [mergeWithInherited(inheritedMetadata, target, methodName)](./metadata.methodmultidecoratorfactory.mergewithinherited.md) | | |
| [mergeWithOwn(ownMetadata, target, methodName, methodDescriptor)](./metadata.methodmultidecoratorfactory.mergewithown.md) | | |