Page Contents
Home > @loopback/openapi-spec-builder > OpenApiSpecBuilder
OpenApiSpecBuilder class
A builder for creating OpenApiSpec documents.
Signature:
export declare class OpenApiSpecBuilder extends BuilderBase<OpenAPIObject>
Extends: BuilderBase<OpenAPIObject>
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)() | Constructs a new instance of the OpenApiSpecBuilder class |
Methods
| Method | Modifiers | Description |
|---|---|---|
| withComponents(spec) | Define a new ComponentsObject. | |
| withOperation(verb, path, spec) | Define a new OperationObject at the given path and verb (method). | |
| withOperationReturningString(verb, path, operationName) | Define a new operation that returns a string response. |