---
lang: en
title: 'API docs: rest.infospecenhancer'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.infospecenhancer.html
---

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

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [InfoSpecEnhancer](./rest.infospecenhancer.md)

## InfoSpecEnhancer class

An OpenAPI spec enhancer to populate `info` with application metadata (package.json).

**Signature:**

```typescript
export declare class InfoSpecEnhancer implements OASEnhancer 
```
**Implements:** [OASEnhancer](./openapi-v3.oasenhancer.md)

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(pkg)](./rest.infospecenhancer._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `InfoSpecEnhancer` class


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[name](./rest.infospecenhancer.name.md)


</td><td>


</td><td>

string


</td><td>


</td></tr>
<tr><td>

[pkg?](./rest.infospecenhancer.pkg.md)


</td><td>

`readonly`


</td><td>

[ApplicationMetadata](./core.applicationmetadata.md) \| undefined


</td><td>

_(Optional)_


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[modifySpec(spec)](./rest.infospecenhancer.modifyspec.md)


</td><td>


</td><td>


</td></tr>
</tbody></table>


