UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

65 lines (34 loc) 1 kB
--- lang: en title: 'API docs: rest.toexpresspath' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest permalink: /doc/en/lb4/apidocs.rest.toexpresspath.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [toExpressPath](./rest.toexpresspath.md) ## toExpressPath() function Convert an OpenAPI path to Express (path-to-regexp) style **Signature:** ```typescript export declare function toExpressPath(path: string): string; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> path </td><td markdown="1"> string </td><td markdown="1"> OpenAPI path with optional variables as `{var}` </td></tr> </tbody></table> **Returns:** string