1
0
mirror of synced 2025-12-22 03:16:52 -05:00

Bump url-template from 2.0.8 to 3.0.0 (#24889)

* Bump url-template from 2.0.8 to 3.0.0

Bumps [url-template](https://github.com/bramstein/url-template) from 2.0.8 to 3.0.0.
- [Release notes](https://github.com/bramstein/url-template/releases)
- [Commits](https://github.com/bramstein/url-template/compare/v2.0.8...v3.0.0)

---
updated-dependencies:
- dependency-name: url-template
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* No more default export

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
This commit is contained in:
dependabot[bot]
2022-02-02 22:27:30 +00:00
committed by GitHub
parent 62612c36b7
commit a02a4355e3
3 changed files with 14 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
import urlTemplate from 'url-template'
import { parseTemplate } from 'url-template'
import { stringify } from 'javascript-stringify'
import { get, mapValues, snakeCase } from 'lodash-es'
export default createCodeSamples
@@ -39,7 +39,7 @@ function toShellExample({ route, serverUrl }) {
const pathParams = mapValues(getExamplePathParams(route), (value, paramName) =>
PARAMETER_EXAMPLES[paramName] ? value : snakeCase(value).toUpperCase()
)
const path = urlTemplate.parse(route.path.replace(/:(\w+)/g, '{$1}')).expand(pathParams)
const path = parseTemplate(route.path.replace(/:(\w+)/g, '{$1}')).expand(pathParams)
const params = getExampleBodyParams(route)
const { method } = route