---
lang: en
title: 'API docs: openapi-v3.oasenhancerservice'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/openapi-v3
permalink: /doc/en/lb4/apidocs.openapi-v3.oasenhancerservice.html
---

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

[Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [OASEnhancerService](./openapi-v3.oasenhancerservice.md)

## OASEnhancerService class

An extension point for OpenAPI Spec enhancement This service is used for enhancing an OpenAPI spec by loading and applying one or more registered enhancers.

A typical use of it would be generating the OpenAPI spec for the endpoints on a server in the `@loopback/rest` module.

**Signature:**

```typescript
export declare class OASEnhancerService 
```

## Constructors

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

Constructor


</th><th>

Modifiers


</th><th>

Description


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

[(constructor)(getEnhancers, options)](./openapi-v3.oasenhancerservice._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `OASEnhancerService` class


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

## Properties

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

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


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

[options?](./openapi-v3.oasenhancerservice.options.md)


</td><td>

`readonly`


</td><td>

[OASEnhancerServiceOptions](./openapi-v3.oasenhancerserviceoptions.md) \| undefined


</td><td>

_(Optional)_ An extension point should be able to receive its options via dependency injection.


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

[spec](./openapi-v3.oasenhancerservice.spec.md)


</td><td>


</td><td>

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


</td><td>

Getter for `_spec`


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

## Methods

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

Method


</th><th>

Modifiers


</th><th>

Description


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

[applyAllEnhancers(options)](./openapi-v3.oasenhancerservice.applyallenhancers.md)


</td><td>


</td><td>

Generate OpenAPI spec by applying ALL registered enhancers TBD: load enhancers by group names


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

[applyEnhancerByName(name)](./openapi-v3.oasenhancerservice.applyenhancerbyname.md)


</td><td>


</td><td>

Apply a given enhancer's merge function. Return the latest \_spec.


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

[getEnhancerByName(name)](./openapi-v3.oasenhancerservice.getenhancerbyname.md)


</td><td>


</td><td>

Find an enhancer by its name


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


