Page Contents

Home > @loopback/rest > OpenApiSpecOptions

OpenApiSpecOptions interface

Options to customize how OpenAPI specs are served

Signature:

export interface OpenApiSpecOptions 

Properties

| Property | Type | Description | | — | — | — | | consolidate | boolean | Set this flag to false to disable OAS schema consolidation. If not set, the value defaults to true. | | disabled | true | Set this flag to disable the endpoint for OpenAPI spec | | endpointMapping | { [key: string]: OpenApiSpecForm; } | Mapping of urls to spec forms, by default:

{
  '/openapi.json': {version: '3.0.0', format: 'json'},
  '/openapi.yaml': {version: '3.0.0', format: 'yaml'},
}

| | servers | ServerObject[] | Configure servers for OpenAPI spec | | setServersFromRequest | boolean | A flag to force servers to be set from the http request for the OpenAPI spec |