---
lang: en
title: 'API docs: openapi-v3.post'
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.post.html
---

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

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

## post() function

Expose a Controller method as a REST API operation mapped to `POST` request method.

**Signature:**

```typescript
export declare function post(path: string, spec?: OperationObject): MethodDecorator;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  path | string | The URL path of this operation, e.g. <code>/product/{id}</code> |
|  spec | OperationObject | _(Optional)_ The OpenAPI specification describing parameters and responses of this operation. |

**Returns:**

MethodDecorator


