@scalar/api-reference 1.31.11 → 1.31.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
1
  import { XScalarStability as o } from "@scalar/types/legacy";
2
- function l(e, t) {
2
+ function p(e, t) {
3
3
  var n;
4
4
  let r = e;
5
5
  const i = (n = t.required) == null ? void 0 : n.includes(e);
6
6
  return r += i ? " REQUIRED " : " optional ", t.properties[e] && (r += t.properties[e].type, t.properties[e].description && (r += " " + t.properties[e].description)), r;
7
7
  }
8
- function p(e) {
8
+ function d(e) {
9
9
  var i;
10
10
  const t = ["Body"], r = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
11
  return r && Object.keys(r).forEach((n) => {
12
12
  if (!e.schema)
13
13
  return;
14
- t.push(l(n, e.schema));
14
+ t.push(p(n, e.schema));
15
15
  const s = r[n];
16
- s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((c) => {
17
- var u, f;
18
- t.push(`${c} ${(f = (u = s.properties) == null ? void 0 : u[c]) == null ? void 0 : f.type}`);
16
+ s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((u) => {
17
+ var a, f;
18
+ t.push(`${u} ${(f = (a = s.properties) == null ? void 0 : a[u]) == null ? void 0 : f.type}`);
19
19
  });
20
20
  }), t;
21
21
  }
@@ -25,12 +25,12 @@ function O(e) {
25
25
  const n = (i = (r = (t = e == null ? void 0 : e.information) == null ? void 0 : t.requestBody) == null ? void 0 : r.content) == null ? void 0 : i["application/json"];
26
26
  if (!n)
27
27
  throw new Error("Body not found");
28
- return p(n);
28
+ return d(n);
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
32
  }
33
- function d(e) {
33
+ function y(e) {
34
34
  var r, i;
35
35
  if (!e)
36
36
  return {};
@@ -42,18 +42,18 @@ function d(e) {
42
42
  )
43
43
  );
44
44
  return Object.keys(t ?? {}).forEach((n) => {
45
- var s;
46
- ((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 && delete t[n];
45
+ var s, c;
46
+ (((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 || ((c = t[n]) == null ? void 0 : c["x-scalar-ignore"]) === !0) && delete t[n];
47
47
  }), t;
48
48
  }
49
- const x = (e) => e ? !!Object.keys(d(e) ?? {}).length : !1;
50
- function a(e, t) {
49
+ const x = (e) => e ? !!Object.keys(y(e) ?? {}).length : !1;
50
+ function l(e, t) {
51
51
  for (const [r, i] of Object.entries(e))
52
- i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(), a(i, t[r])) : typeof i < "u" && (t[r] = i);
52
+ i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(), l(i, t[r])) : typeof i < "u" && (t[r] = i);
53
53
  return t;
54
54
  }
55
- function b(e) {
56
- return a(e ?? {}, {
55
+ function g(e) {
56
+ return l(e ?? {}, {
57
57
  info: {
58
58
  title: "",
59
59
  description: "",
@@ -71,24 +71,24 @@ function b(e) {
71
71
  tags: []
72
72
  });
73
73
  }
74
- function g(e) {
74
+ function b(e) {
75
75
  return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] === o.Deprecated);
76
76
  }
77
- function y(e) {
77
+ function m(e) {
78
78
  return e.deprecated ? o.Deprecated : e["x-scalar-stability"];
79
79
  }
80
80
  function E(e) {
81
- const t = y(e);
81
+ const t = m(e);
82
82
  return t === o.Deprecated ? "text-red" : t === o.Experimental ? "text-orange" : t === o.Stable ? "text-green" : "";
83
83
  }
84
84
  export {
85
- b as createEmptySpecification,
86
- a as deepMerge,
85
+ g as createEmptySpecification,
86
+ l as deepMerge,
87
87
  O as extractRequestBody,
88
- l as formatProperty,
89
- d as getModels,
90
- y as getOperationStability,
88
+ p as formatProperty,
89
+ y as getModels,
90
+ m as getOperationStability,
91
91
  E as getOperationStabilityColor,
92
92
  x as hasModels,
93
- g as isOperationDeprecated
93
+ b as isOperationDeprecated
94
94
  };