Page Contents
Home > @loopback/openapi-spec-builder > OpenApiSpecBuilder > withOperationReturningString
OpenApiSpecBuilder.withOperationReturningString() method
Define a new operation that returns a string response.
Signature:
withOperationReturningString(verb: string, path: string, operationName?: string): this;
Parameters
Parameter | Type | Description |
---|---|---|
verb | string | The HTTP verb. |
path | string | The path relative to basePath. |
operationName | string | (Optional) The name of the controller method implementing this operation (x-operation-name field). |
Returns:
this