---
lang: en
title: 'API docs: openapi-v3'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.openapi-v3.html
---

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

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

## openapi-v3 package

[@loopback/openapi-v3](https://github.com/strongloop/loopback-next/tree/master/packages/openapi-v3)

## Functions

|  Function | Description |
|  --- | --- |
|  [api(spec)](./openapi-v3.api.md) | Decorate the given Controller constructor with metadata describing the HTTP/REST API the Controller implements/provides.<code>@api</code> can be applied to controller classes. |
|  [del(path, spec)](./openapi-v3.del.md) | Expose a Controller method as a REST API operation mapped to <code>DELETE</code> request method. |
|  [get(path, spec)](./openapi-v3.get.md) | Expose a Controller method as a REST API operation mapped to <code>GET</code> request method. |
|  [getControllerSpec(constructor)](./openapi-v3.getcontrollerspec.md) | Get the controller spec for the given class |
|  [getFilterSchemaFor(modelCtor)](./openapi-v3.getfilterschemafor.md) | Build an OpenAPI schema describing the format of the "filter" object used to query model instances.<!-- -->Note we don't take the model properties into account yet and return a generic json schema allowing any "where" condition. |
|  [getModelSchemaRef(modelCtor, options)](./openapi-v3.getmodelschemaref.md) | Describe the provided Model as a reference to a definition shared by multiple endpoints. The definition is included in the returned schema. |
|  [getWhereSchemaFor(modelCtor)](./openapi-v3.getwhereschemafor.md) | Build a OpenAPI schema describing the format of the "where" object used to filter model instances to query, update or delete.<!-- -->Note we don't take the model properties into account yet and return a generic json schema allowing any "where" condition. |
|  [jsonOrBooleanToJSON(jsonOrBool)](./openapi-v3.jsonorbooleantojson.md) | Helper function used to interpret boolean values as JSON Schemas. See http://json-schema.org/draft-06/json-schema-release-notes.html |
|  [jsonToSchemaObject(json)](./openapi-v3.jsontoschemaobject.md) | Converts JSON Schemas into a SchemaObject |
|  [operation(verb, path, spec)](./openapi-v3.operation.md) | Expose a Controller method as a REST API operation. |
|  [param(paramSpec)](./openapi-v3.param.md) | Describe an input parameter of a Controller method.<code>@param</code> must be applied to parameters. |
|  [patch(path, spec)](./openapi-v3.patch.md) | Expose a Controller method as a REST API operation mapped to <code>PATCH</code> request method. |
|  [post(path, spec)](./openapi-v3.post.md) | Expose a Controller method as a REST API operation mapped to <code>POST</code> request method. |
|  [put(path, spec)](./openapi-v3.put.md) | Expose a Controller method as a REST API operation mapped to <code>PUT</code> request method. |
|  [requestBody(requestBodySpec)](./openapi-v3.requestbody.md) | Describe the request body of a Controller method parameter.<!-- -->A typical OpenAPI requestBody spec contains property: - <code>description</code> - <code>required</code> - <code>content</code>. |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [ControllerSpec](./openapi-v3.controllerspec.md) |  |
|  [RestEndpoint](./openapi-v3.restendpoint.md) | Data structure for REST related metadata |

## Namespaces

|  Namespace | Description |
|  --- | --- |
|  [param](./openapi-v3.param.md) | Describe an input parameter of a Controller method. The <code>@param</code> decorator takes an argument of <code>ParameterObject</code> to define how to map the parameter to OpenAPI specification.<code>@param(paramSpec)</code> must be applied to parameters. |
|  [requestBody](./openapi-v3.requestbody.md) |  |

## Variables

|  Variable | Description |
|  --- | --- |
|  [REQUEST\_BODY\_INDEX](./openapi-v3.request_body_index.md) |  |
|  [TS\_TYPE\_KEY](./openapi-v3.ts_type_key.md) |  |

## Type Aliases

|  Type Alias | Description |
|  --- | --- |
|  [SchemaRef](./openapi-v3.schemaref.md) | Custom LoopBack extension: a reference to Schema object that's bundled inside <code>definitions</code> property. |


