# mergeAuthoredDocs

**Kind:** Function

**Source:** [`atloria-monorepo/libs/parser-core/src/openapi/doc-annotations.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/openapi/doc-annotations.ts#L436)

Layer authored sources by strength: later arguments win field by field.

Call it as `mergeAuthoredDocs(docComment, annotation)` — weakest first — so the explicit
annotation the author published to their own API tooling always lands on top. An absent
field on the stronger source never erases a present field on the weaker one, which is what
lets a handler keep its JSDoc `@param` prose while `@ApiOperation` supplies the summary.

## Signature

```ts
function mergeAuthoredDocs(layers: Array<AuthoredDocs | undefined>): AuthoredDocs
```

## Parameters

| Name | Type |
|---|---|
| `layers` | `Array<AuthoredDocs | undefined>` |

**Returns:** `AuthoredDocs`
