UNPKG

@scalar/api-client

Version:

the open source API testing client

17 lines (16 loc) 480 B
const i = (a) => { const r = { invalidParams: /* @__PURE__ */ new Set(), hasBlockingErrors: !1 }; return a && (a.parameters?.path?.forEach((e) => { e.enabled && e.value.trim() === "" && (r.invalidParams.add(e.key), r.hasBlockingErrors = !0); }), ["query", "headers", "cookies"].forEach((e) => { a.parameters?.[e]?.forEach((s) => { s.required && s.value === "" && r.invalidParams.add(s.key); }); })), r; }; export { i as validateParameters };