@loopback/docs
Version:
Documentation for LoopBack 4
37 lines (24 loc) • 1.35 kB
Markdown
lang: en
title: 'API docs: openapi-spec-builder.openapispecbuilder'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.openapi-spec-builder.openapispecbuilder.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/openapi-spec-builder](./openapi-spec-builder.md) > [OpenApiSpecBuilder](./openapi-spec-builder.openapispecbuilder.md)
## OpenApiSpecBuilder class
A builder for creating OpenApiSpec documents.
<b>Signature:</b>
```typescript
export declare class OpenApiSpecBuilder extends BuilderBase<OpenAPIObject>
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)()](./openapi-spec-builder.openapispecbuilder._constructor_.md) | | Constructs a new instance of the <code>OpenApiSpecBuilder</code> class |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [withOperation(verb, path, spec)](./openapi-spec-builder.openapispecbuilder.withoperation.md) | | Define a new OperationObject at the given path and verb (method). |
| [withOperationReturningString(verb, path, operationName)](./openapi-spec-builder.openapispecbuilder.withoperationreturningstring.md) | | Define a new operation that returns a string response. |