Page Contents

Home > @loopback/rest > OpenApiSpecOptions

OpenApiSpecOptions interface

Options to customize how OpenAPI specs are served

Signature:

export interface OpenApiSpecOptions 

Properties

| Property | Type | Description | | — | — | — | | 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 |