---
lang: en
title: 'API docs: rest.openapispecoptions'
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.openapispecoptions.html
---

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

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [OpenApiSpecOptions](./rest.openapispecoptions.md)

## OpenApiSpecOptions interface

Options to customize how OpenAPI specs are served

**Signature:**

```typescript
export interface OpenApiSpecOptions 
```

## Properties

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

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


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

[consolidate?](./rest.openapispecoptions.consolidate.md)


</td><td>


</td><td>

boolean


</td><td>

_(Optional)_ Set this flag to `false` to disable OAS schema consolidation. If not set, the value defaults to `true`<!-- -->.


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

[disabled?](./rest.openapispecoptions.disabled.md)


</td><td>


</td><td>

true


</td><td>

_(Optional)_ Set this flag to disable the endpoint for OpenAPI spec


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

[endpointMapping?](./rest.openapispecoptions.endpointmapping.md)


</td><td>


</td><td>

{ \[key: string\]: [OpenApiSpecForm](./rest.openapispecform.md)<!-- -->; }


</td><td>

_(Optional)_ Mapping of urls to spec forms, by default: <br> { <br> '/openapi.json': {<!-- -->version: '3.0.0', format: 'json'<!-- -->}<!-- -->, <br> '/openapi.yaml': {<!-- -->version: '3.0.0', format: 'yaml'<!-- -->}<!-- -->, <br> }


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

[servers?](./rest.openapispecoptions.servers.md)


</td><td>


</td><td>

ServerObject\[\]


</td><td>

_(Optional)_ Configure servers for OpenAPI spec


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

[setServersFromRequest?](./rest.openapispecoptions.setserversfromrequest.md)


</td><td>


</td><td>

boolean


</td><td>

_(Optional)_ A flag to force `servers` to be set from the http request for the OpenAPI spec


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


