Page Contents
Home > @loopback/rest > OpenApiSpecOptions
OpenApiSpecOptions interface
Options to customize how OpenAPI specs are served
Signature:
export interface OpenApiSpecOptions
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| [consolidate?](/doc/en/lb4/apidocs.rest.openapispecoptions.consolidate.html) | boolean | _(Optional)_ Set this flag to `false` to disable OAS schema consolidation. If not set, the value defaults to `true`. | |
| [disabled?](/doc/en/lb4/apidocs.rest.openapispecoptions.disabled.html) | true | _(Optional)_ Set this flag to disable the endpoint for OpenAPI spec | |
| [endpointMapping?](/doc/en/lb4/apidocs.rest.openapispecoptions.endpointmapping.html) | { \[key: string\]: [OpenApiSpecForm](/doc/en/lb4/apidocs.rest.openapispecform.html); } |
_(Optional)_ 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?](/doc/en/lb4/apidocs.rest.openapispecoptions.servers.html) | ServerObject\[\] | _(Optional)_ Configure servers for OpenAPI spec | |
| [setServersFromRequest?](/doc/en/lb4/apidocs.rest.openapispecoptions.setserversfromrequest.html) | boolean | _(Optional)_ A flag to force `servers` to be set from the http request for the OpenAPI spec |