MCPcopy
hub / github.com/swagger-api/swagger-ui / safeBuildUrl

Function safeBuildUrl

src/core/utils/url.js:33–39  ·  view source on GitHub ↗
(url, specUrl, { selectedServer="" } = {})

Source from the content-addressed store, hash-verified

31 * which can fail the URL resolution.
32 */
33export function safeBuildUrl(url, specUrl, { selectedServer="" } = {}) {
34 try {
35 return buildUrl(url, specUrl, { selectedServer })
36 } catch {
37 return undefined
38 }
39}
40
41export function sanitizeUrl(url) {
42 if (typeof url !== "string" || url.trim() === "") {

Callers 9

utils.jsFile · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
selectors.jsFile · 0.90
selectors.jsFile · 0.90
selectors.jsFile · 0.90

Calls 1

buildUrlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…