Page Contents

Home > @loopback/openapi-spec-builder > BuilderBase > withExtension

BuilderBase.withExtension() method

Add a custom (extension) property to the spec object.

Signature:

withExtension(key: string, value: any): this;

Parameters

Parameter Type Description
key string The property name starting with “x-“.
value any The property value.

Returns:

this