---
lang: en
title: 'API docs: rest.toexpresspath'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/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

<b>Signature:</b>

```typescript
export declare function toExpressPath(path: string): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  path | string | OpenAPI path with optional variables as <code>{var}</code> |

<b>Returns:</b>

string


