@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
24 lines (23 loc) • 812 B
JavaScript
import { defineComponent as d, computed as m, createElementBlock as e, openBlock as t, normalizeClass as h, Fragment as o, renderList as u, toDisplayString as r, createTextVNode as _ } from "vue";
const k = { key: 0 }, B = /* @__PURE__ */ d({
__name: "OperationPath",
props: {
path: {},
deprecated: { type: Boolean }
},
setup(s) {
const p = s, c = (a) => a.startsWith("{") && a.endsWith("}"), i = m(() => p.path.split(/({[^}]+})/));
return (a, y) => (t(), e("span", {
class: h(["operation-path", { deprecated: a.deprecated }])
}, [
(t(!0), e(o, null, u(i.value, (n, l) => (t(), e(o, { key: l }, [
c(n) ? (t(), e("em", k, r(n), 1)) : (t(), e(o, { key: 1 }, [
_(r(n), 1)
], 64))
], 64))), 128))
], 2));
}
});
export {
B as default
};