Page Contents

Home > @loopback/openapi-spec-builder > OpenApiSpecBuilder

OpenApiSpecBuilder class

A builder for creating OpenApiSpec documents.


export declare class OpenApiSpecBuilder extends BuilderBase<OpenAPIObject> 

Extends: BuilderBase<OpenAPIObject>


Constructor Modifiers Description
(constructor)()   Constructs a new instance of the OpenApiSpecBuilder class


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.