---
lang: en
title: 'API docs: rest.infospecenhancer.modifyspec'
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.modifyspec.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) &gt; [modifySpec](./rest.infospecenhancer.modifyspec.md)

## InfoSpecEnhancer.modifySpec() method

**Signature:**

```typescript
modifySpec(spec: OpenApiSpec): OpenApiSpec;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  spec | [OpenApiSpec](./openapi-v3.openapispec.md) |  |

**Returns:**

[OpenApiSpec](./openapi-v3.openapispec.md)


