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

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [getControllerSpec](./openapi-v3.getcontrollerspec.md)

## getControllerSpec() function

Get the controller spec for the given class

**Signature:**

```typescript
export declare function getControllerSpec(constructor: Function): ControllerSpec;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

constructor


</td><td markdown="1">

Function


</td><td markdown="1">

Controller class


</td></tr>
</tbody></table>

**Returns:**

[ControllerSpec](./openapi-v3.controllerspec.md)


