@scalar/api-reference 1.35.3 → 1.35.5

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/browser/standalone.js +2173 -2149
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Schema/Schema.vue.d.ts +4 -0
  5. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  6. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  7. package/dist/components/Content/Schema/Schema.vue2.js +71 -65
  8. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -0
  9. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Schema/SchemaComposition.vue.js +44 -38
  11. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +4 -0
  12. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +53 -42
  14. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -0
  15. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  17. package/dist/components/Content/Schema/SchemaProperty.vue2.js +96 -88
  18. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  19. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  20. package/dist/features/Operation/components/ParameterListItem.vue2.js +20 -19
  21. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  22. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  23. package/dist/features/Operation/components/RequestBody.vue2.js +28 -25
  24. package/dist/features/api-client-modal/useApiClient.d.ts +90 -90
  25. package/dist/index.js +1 -1
  26. package/dist/style.css +1 -1
  27. package/package.json +10 -10
@@ -1,15 +1,15 @@
1
- import { defineComponent as M, computed as l, createBlock as u, openBlock as t, resolveDynamicComponent as $, normalizeClass as I, withCtx as f, createCommentVNode as s, createElementBlock as o, createVNode as m, createSlots as z, unref as a, toDisplayString as y, Fragment as b, createTextVNode as S, renderList as U } from "vue";
2
- import { ScalarMarkdown as R } from "@scalar/components";
3
- import { isDefined as Z } from "@scalar/helpers/array/is-defined";
4
- import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
- import { isArraySchema as p } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
6
- import { isTypeObject as L } from "./helpers/is-type-object.js";
7
- import { optimizeValueForDisplay as G } from "./helpers/optimize-value-for-display.js";
8
- import { compositions as J } from "./helpers/schema-composition.js";
9
- import D from "./Schema.vue.js";
10
- import K from "./SchemaComposition.vue.js";
11
- import Q from "./SchemaEnumValues.vue.js";
12
- import W from "./SchemaPropertyHeading.vue.js";
1
+ import { defineComponent as F, computed as l, createBlock as c, openBlock as i, resolveDynamicComponent as M, normalizeClass as $, withCtx as y, createCommentVNode as s, createElementBlock as a, createVNode as d, createSlots as I, unref as o, toDisplayString as f, Fragment as h, createTextVNode as N, renderList as z } from "vue";
2
+ import { ScalarMarkdown as S } from "@scalar/components";
3
+ import { isDefined as U } from "@scalar/helpers/array/is-defined";
4
+ import { getResolvedRef as b } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import { isArraySchema as m } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
6
+ import { isTypeObject as Z } from "./helpers/is-type-object.js";
7
+ import { optimizeValueForDisplay as L } from "./helpers/optimize-value-for-display.js";
8
+ import { compositions as G } from "./helpers/schema-composition.js";
9
+ import W from "./Schema.vue.js";
10
+ import J from "./SchemaComposition.vue.js";
11
+ import K from "./SchemaEnumValues.vue.js";
12
+ import Q from "./SchemaPropertyHeading.vue.js";
13
13
  import X from "../../Anchor/WithBreadcrumb.vue2.js";
14
14
  import Y from "../../../features/specification-extension/SpecificationExtension.vue2.js";
15
15
  const _ = {
@@ -21,16 +21,16 @@ const _ = {
21
21
  }, ee = {
22
22
  key: 1,
23
23
  class: "property-description"
24
- }, re = {
24
+ }, ne = {
25
25
  key: 2,
26
26
  class: "property-description"
27
- }, ne = {
27
+ }, re = {
28
28
  key: 4,
29
29
  class: "children"
30
- }, te = {
30
+ }, ie = {
31
31
  key: 0,
32
32
  class: "children"
33
- }, ve = /* @__PURE__ */ M({
33
+ }, ve = /* @__PURE__ */ F({
34
34
  __name: "SchemaProperty",
35
35
  props: {
36
36
  is: {},
@@ -44,11 +44,13 @@ const _ = {
44
44
  description: {},
45
45
  hideModelNames: { type: Boolean, default: !1 },
46
46
  hideHeading: { type: Boolean },
47
+ hideReadOnly: { type: Boolean },
48
+ hideWriteOnly: { type: Boolean },
47
49
  variant: {},
48
50
  breadcrumb: {}
49
51
  },
50
- setup(H) {
51
- const c = H, v = {
52
+ setup(D) {
53
+ const u = D, v = {
52
54
  integer: {
53
55
  _default: "Integer numbers.",
54
56
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -62,68 +64,68 @@ const _ = {
62
64
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
63
65
  binary: "binary data, used to describe files"
64
66
  }
65
- }, g = (e) => !e || !v[e.type] ? null : v[e.type][e.format || e.contentEncoding || "_default"], V = (e) => {
66
- var n;
67
- return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
68
- }, r = l(() => G(c.value)), k = l(() => {
69
- const e = r.value;
70
- return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e != null && e.allOf || e != null && e.allOf ? null : c.description || (e == null ? void 0 : e.description) || null;
71
- }), w = (e, n, i) => n || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) !== void 0 || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || i, P = l(() => {
72
- const e = r.value;
73
- if (!e || !p(e) || typeof e.items != "object")
67
+ }, O = (e) => !e || !v[e.type] ? null : v[e.type][e.format || e.contentEncoding || "_default"], H = (e) => {
68
+ var r;
69
+ return (e == null ? void 0 : e.enum) || ((r = e == null ? void 0 : e.items) == null ? void 0 : r.enum) || [];
70
+ }, n = l(() => L(u.value)), g = l(() => {
71
+ const e = n.value;
72
+ return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e != null && e.allOf || e != null && e.allOf ? null : u.description || (e == null ? void 0 : e.description) || null;
73
+ }), V = (e, r, t) => r || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) !== void 0 || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || t, k = l(() => {
74
+ const e = n.value;
75
+ if (!e || !m(e) || typeof e.items != "object")
74
76
  return !1;
75
- const n = e.items;
76
- return "type" in n && n.type && (Array.isArray(n.type) ? n.type.includes("object") : ["object"].includes(n.type)) || "properties" in n || "$ref" in n || "discriminator" in n || "allOf" in n || "oneOf" in n || "anyOf" in n;
77
- }), A = (e) => {
78
- const n = r.value;
79
- return n && p(n) === !1 || !(n != null && n.items) || typeof n.items != "object" || !(e in n.items) ? !1 : !P.value;
80
- }, T = l(() => P.value), q = l(() => {
81
- if (!r.value)
77
+ const r = e.items;
78
+ return "type" in r && r.type && (Array.isArray(r.type) ? r.type.includes("object") : ["object"].includes(r.type)) || "properties" in r || "$ref" in r || "discriminator" in r || "allOf" in r || "oneOf" in r || "anyOf" in r;
79
+ }), w = (e) => {
80
+ const r = n.value;
81
+ return r && m(r) === !1 || !(r != null && r.items) || typeof r.items != "object" || !(e in r.items) ? !1 : !k.value;
82
+ }, A = l(() => k.value), T = l(() => {
83
+ if (!n.value)
82
84
  return !1;
83
- const e = r.value, n = L(e), i = "properties" in e || "additionalProperties" in e;
84
- return n && i;
85
- }), E = l(() => c.level <= 1), F = l(() => r.value ? J.map((e) => {
86
- var i, d;
87
- return ((i = r.value) == null ? void 0 : i[e]) && !(p(r.value) && ((d = r.value) != null && d.items) && typeof e == "string" && typeof r.value.items == "object" && e in r.value.items) ? {
85
+ const e = n.value, r = Z(e), t = "properties" in e || "additionalProperties" in e;
86
+ return r && t;
87
+ }), q = l(() => u.level <= 1), E = l(() => n.value ? G.map((e) => {
88
+ var t, p;
89
+ return ((t = n.value) == null ? void 0 : t[e]) && !(m(n.value) && ((p = n.value) != null && p.items) && typeof e == "string" && typeof n.value.items == "object" && e in n.value.items) ? {
88
90
  composition: e,
89
- value: r.value
90
- } : A(e) && r.value && p(r.value) && r.value.items ? {
91
+ value: n.value
92
+ } : w(e) && n.value && m(n.value) && n.value.items ? {
91
93
  composition: e,
92
- value: r.value.items
94
+ value: n.value.items
93
95
  } : null;
94
- }).filter(Z) : []);
95
- return (e, n) => {
96
- var i;
97
- return t(), u($(e.is ?? "li"), {
98
- class: I(["property", [
96
+ }).filter(U) : []);
97
+ return (e, r) => {
98
+ var t;
99
+ return i(), c(M(e.is ?? "li"), {
100
+ class: $(["property", [
99
101
  `property--level-${e.level}`,
100
102
  {
101
103
  "property--compact": e.compact,
102
- "property--deprecated": (i = r.value) == null ? void 0 : i.deprecated
104
+ "property--deprecated": (t = n.value) == null ? void 0 : t.deprecated
103
105
  }
104
106
  ]])
105
107
  }, {
106
- default: f(() => {
107
- var d, O, C, j;
108
+ default: y(() => {
109
+ var p, R, P, B;
108
110
  return [
109
- w(r.value, e.name, e.required) ? (t(), u(W, {
111
+ V(n.value, e.name, e.required) ? (i(), c(Q, {
110
112
  key: 0,
111
113
  class: "group",
112
- enum: V(r.value).length > 0,
114
+ enum: H(n.value).length > 0,
113
115
  hideModelNames: e.hideModelNames,
114
116
  isDiscriminator: e.discriminator && e.discriminator.propertyName === e.name,
115
117
  required: e.required,
116
- value: r.value
117
- }, z({ _: 2 }, [
118
+ value: n.value
119
+ }, I({ _: 2 }, [
118
120
  e.name ? {
119
121
  name: "name",
120
- fn: f(() => [
121
- m(a(X), {
122
- breadcrumb: E.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
122
+ fn: y(() => [
123
+ d(o(X), {
124
+ breadcrumb: q.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
123
125
  }, {
124
- default: f(() => [
125
- e.variant === "patternProperties" ? (t(), o("span", _, y(e.name), 1)) : e.variant === "additionalProperties" ? (t(), o("span", x, y(e.name), 1)) : (t(), o(b, { key: 2 }, [
126
- S(y(e.name), 1)
126
+ default: y(() => [
127
+ e.variant === "patternProperties" ? (i(), a("span", _, f(e.name), 1)) : e.variant === "additionalProperties" ? (i(), a("span", x, f(e.name), 1)) : (i(), a(h, { key: 2 }, [
128
+ N(f(e.name), 1)
127
129
  ], 64))
128
130
  ]),
129
131
  _: 1
@@ -131,62 +133,68 @@ const _ = {
131
133
  ]),
132
134
  key: "0"
133
135
  } : void 0,
134
- (d = r.value) != null && d.example ? {
136
+ (p = n.value) != null && p.example ? {
135
137
  name: "example",
136
- fn: f(() => [
137
- S(" Example: " + y(r.value.example), 1)
138
+ fn: y(() => [
139
+ N(" Example: " + f(n.value.example), 1)
138
140
  ]),
139
141
  key: "1"
140
142
  } : void 0
141
143
  ]), 1032, ["enum", "hideModelNames", "isDiscriminator", "required", "value"])) : s("", !0),
142
- k.value ? (t(), o("div", ee, [
143
- m(a(R), { value: k.value }, null, 8, ["value"])
144
- ])) : g(r.value) ? (t(), o("div", re, [
145
- m(a(R), {
146
- value: g(r.value) || ""
144
+ g.value ? (i(), a("div", ee, [
145
+ d(o(S), { value: g.value }, null, 8, ["value"])
146
+ ])) : O(n.value) ? (i(), a("div", ne, [
147
+ d(o(S), {
148
+ value: O(n.value) || ""
147
149
  }, null, 8, ["value"])
148
150
  ])) : s("", !0),
149
- (((O = r.value) == null ? void 0 : O.enum) || r.value && a(p)(r.value) && ((j = a(h)((C = r.value) == null ? void 0 : C.items)) == null ? void 0 : j.enum) || []).length ? (t(), u(Q, {
151
+ (((R = n.value) == null ? void 0 : R.enum) || n.value && o(m)(n.value) && ((B = o(b)((P = n.value) == null ? void 0 : P.items)) == null ? void 0 : B.enum) || []).length ? (i(), c(K, {
150
152
  key: 3,
151
- value: r.value
153
+ value: n.value
152
154
  }, null, 8, ["value"])) : s("", !0),
153
- q.value ? (t(), o("div", ne, [
154
- m(D, {
155
+ T.value ? (i(), a("div", re, [
156
+ d(W, {
155
157
  breadcrumb: e.breadcrumb && e.name ? [...e.breadcrumb, e.name] : void 0,
156
158
  compact: e.compact,
159
+ hideReadOnly: e.hideReadOnly,
160
+ hideWriteOnly: e.hideWriteOnly,
157
161
  level: e.level + 1,
158
162
  name: e.name,
159
163
  noncollapsible: e.noncollapsible,
160
- schema: r.value
161
- }, null, 8, ["breadcrumb", "compact", "level", "name", "noncollapsible", "schema"])
164
+ schema: n.value
165
+ }, null, 8, ["breadcrumb", "compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
162
166
  ])) : s("", !0),
163
- r.value && a(p)(r.value) && typeof r.value.items == "object" ? (t(), o(b, { key: 5 }, [
164
- T.value ? (t(), o("div", te, [
165
- m(D, {
167
+ n.value && o(m)(n.value) && typeof n.value.items == "object" ? (i(), a(h, { key: 5 }, [
168
+ A.value ? (i(), a("div", ie, [
169
+ d(W, {
166
170
  compact: e.compact,
171
+ hideReadOnly: e.hideReadOnly,
172
+ hideWriteOnly: e.hideWriteOnly,
167
173
  level: e.level + 1,
168
174
  name: e.name,
169
175
  noncollapsible: e.noncollapsible,
170
- schema: a(h)(r.value.items)
171
- }, null, 8, ["compact", "level", "name", "noncollapsible", "schema"])
176
+ schema: o(b)(n.value.items)
177
+ }, null, 8, ["compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
172
178
  ])) : s("", !0)
173
179
  ], 64)) : s("", !0),
174
- (t(!0), o(b, null, U(F.value, (B) => {
175
- var N;
176
- return t(), u(K, {
177
- key: B.composition,
180
+ (i(!0), a(h, null, z(E.value, (C) => {
181
+ var j;
182
+ return i(), c(J, {
183
+ key: C.composition,
178
184
  breadcrumb: e.breadcrumb,
179
185
  compact: e.compact,
180
- composition: B.composition,
181
- discriminator: (N = e.value) == null ? void 0 : N.discriminator,
186
+ composition: C.composition,
187
+ discriminator: (j = e.value) == null ? void 0 : j.discriminator,
182
188
  hideHeading: e.hideHeading,
189
+ hideReadOnly: e.hideReadOnly,
190
+ hideWriteOnly: e.hideWriteOnly,
183
191
  level: e.level,
184
192
  name: e.name,
185
193
  noncollapsible: e.noncollapsible,
186
- value: a(h)(c.value)
187
- }, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "level", "name", "noncollapsible", "value"]);
194
+ value: o(b)(u.value)
195
+ }, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "value"]);
188
196
  }), 128)),
189
- m(a(Y), { value: r.value }, null, 8, ["value"])
197
+ d(o(Y), { value: n.value }, null, 8, ["value"])
190
198
  ];
191
199
  }),
192
200
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAoSF,wBAMG"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAqRA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAsSF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./ParameterListItem.vue2.js";
2
2
  import "./ParameterListItem.vue3.js";
3
3
  import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-61c384f2"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f259ff0d"]]);
5
5
  export {
6
- e as default
6
+ a as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as S, computed as m, ref as q, createElementBlock as I, openBlock as n, createVNode as u, createElementVNode as p, unref as o, withCtx as f, createBlock as d, createCommentVNode as v, normalizeClass as E, toDisplayString as N } from "vue";
2
- import { Disclosure as P, DisclosureButton as R, DisclosurePanel as j } from "@headlessui/vue";
3
- import { ScalarMarkdown as z } from "@scalar/components";
4
- import { isDefined as O } from "@scalar/helpers/array/is-defined";
1
+ import { defineComponent as S, computed as m, ref as q, createElementBlock as I, openBlock as n, createVNode as c, createElementVNode as p, unref as o, withCtx as f, createBlock as d, createCommentVNode as v, normalizeClass as E, toDisplayString as N } from "vue";
2
+ import { Disclosure as O, DisclosureButton as P, DisclosurePanel as R } from "@headlessui/vue";
3
+ import { ScalarMarkdown as j } from "@scalar/components";
4
+ import { isDefined as z } from "@scalar/helpers/array/is-defined";
5
5
  import { ScalarIconCaretRight as H } from "@scalar/icons";
6
6
  import { getResolvedRef as B } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
7
  import L from "../../../components/Content/Schema/SchemaProperty.vue.js";
8
8
  import M from "./ContentTypeSelect.vue.js";
9
9
  import T from "./Headers.vue.js";
10
- const U = { class: "parameter-item group/parameter-item relative" }, $ = { class: "parameter-item-name" }, A = { class: "parameter-item-type" }, F = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, ae = /* @__PURE__ */ S({
10
+ const U = { class: "parameter-item group/parameter-item relative" }, W = { class: "parameter-item-name" }, $ = { class: "parameter-item-type" }, A = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, ae = /* @__PURE__ */ S({
11
11
  __name: "ParameterListItem",
12
12
  props: {
13
13
  parameter: {},
@@ -25,36 +25,36 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
25
25
  () => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
26
26
  ), C = m(() => {
27
27
  var b, y, g, k, w, x;
28
- const a = t.value ? (y = (b = t.value) == null ? void 0 : b[i.value]) == null ? void 0 : y.schema : s.value, c = "deprecated" in e.parameter ? e.parameter.deprecated : (g = s.value) == null ? void 0 : g.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, V = ((k = s.value) == null ? void 0 : k.examples) ?? [], D = [...Object.values({
28
+ const a = t.value ? (y = (b = t.value) == null ? void 0 : b[i.value]) == null ? void 0 : y.schema : s.value, u = "deprecated" in e.parameter ? e.parameter.deprecated : (g = s.value) == null ? void 0 : g.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, V = ((k = s.value) == null ? void 0 : k.examples) ?? [], D = [...Object.values({
29
29
  ...r,
30
30
  ...(x = (w = t.value) == null ? void 0 : w[i.value]) == null ? void 0 : x.examples
31
31
  }), ...V];
32
32
  return {
33
33
  ...B(a),
34
- deprecated: c,
35
- ..."example" in e.parameter && O(e.parameter.example) && { example: e.parameter.example },
34
+ deprecated: u,
35
+ ..."example" in e.parameter && z(e.parameter.example) && { example: e.parameter.example },
36
36
  examples: D
37
37
  };
38
38
  }), l = m(
39
39
  () => !!(e.collapsableItems && (t.value || h.value || s.value))
40
40
  );
41
- return (a, c) => (n(), I("li", U, [
42
- u(o(P), null, {
41
+ return (a, u) => (n(), I("li", U, [
42
+ c(o(O), null, {
43
43
  default: f(({ open: r }) => [
44
- l.value ? (n(), d(o(R), {
44
+ l.value ? (n(), d(o(P), {
45
45
  key: 0,
46
46
  class: E(["parameter-item-trigger", { "parameter-item-trigger-open": r }])
47
47
  }, {
48
48
  default: f(() => [
49
- p("span", $, [
50
- u(o(H), {
49
+ p("span", W, [
50
+ c(o(H), {
51
51
  class: E(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": r }]),
52
52
  weight: "bold"
53
53
  }, null, 8, ["class"]),
54
54
  p("span", null, N(a.name), 1)
55
55
  ]),
56
- p("span", A, [
57
- a.parameter.description ? (n(), d(o(z), {
56
+ p("span", $, [
57
+ a.parameter.description ? (n(), d(o(j), {
58
58
  key: 0,
59
59
  class: "markdown",
60
60
  value: a.parameter.description
@@ -63,7 +63,7 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
63
63
  ]),
64
64
  _: 2
65
65
  }, 1032, ["class"])) : v("", !0),
66
- u(o(j), {
66
+ c(o(R), {
67
67
  class: "parameter-item-container parameter-item-container-markdown",
68
68
  static: !l.value
69
69
  }, {
@@ -73,11 +73,12 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
73
73
  breadcrumb: a.breadcrumb,
74
74
  headers: h.value
75
75
  }, null, 8, ["breadcrumb", "headers"])) : v("", !0),
76
- u(L, {
76
+ c(L, {
77
77
  is: "div",
78
78
  breadcrumb: a.breadcrumb,
79
79
  compact: "",
80
80
  description: l.value ? "" : a.parameter.description,
81
+ hideWriteOnly: !0,
81
82
  name: l.value ? "" : a.name,
82
83
  noncollapsible: !0,
83
84
  required: "required" in a.parameter && a.parameter.required,
@@ -90,11 +91,11 @@ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class
90
91
  ]),
91
92
  _: 1
92
93
  }),
93
- p("div", F, [
94
+ p("div", A, [
94
95
  l.value && t.value ? (n(), d(M, {
95
96
  key: 0,
96
97
  modelValue: i.value,
97
- "onUpdate:modelValue": c[0] || (c[0] = (r) => i.value = r),
98
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => i.value = r),
98
99
  class: "parameter-item-content-type",
99
100
  content: t.value
100
101
  }, null, 8, ["modelValue", "content"])) : v("", !0)
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAQrG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AAoMF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAQrG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AA0MF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  import "./RequestBody.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-593d1099"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-74a1b5fb"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as h, computed as m, ref as f, createElementBlock as s, createCommentVNode as u, openBlock as a, createElementVNode as q, createVNode as n, renderSlot as B, unref as c } from "vue";
2
- import { ScalarMarkdown as k } from "@scalar/components";
3
- import { getResolvedRef as _ } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import { isTypeObject as E } from "../../../components/Content/Schema/helpers/is-type-object.js";
5
- import R from "./ContentTypeSelect.vue.js";
1
+ import { defineComponent as q, computed as m, ref as f, createElementBlock as s, createCommentVNode as d, openBlock as a, createElementVNode as h, createVNode as n, renderSlot as B, unref as u } from "vue";
2
+ import { ScalarMarkdown as R } from "@scalar/components";
3
+ import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import { isTypeObject as O } from "../../../components/Content/Schema/helpers/is-type-object.js";
5
+ import _ from "./ContentTypeSelect.vue.js";
6
6
  import p from "../../../components/Content/Schema/Schema.vue.js";
7
- const P = {
7
+ const E = {
8
8
  key: 0,
9
9
  class: "request-body"
10
- }, V = { class: "request-body-header" }, j = { class: "request-body-title" }, O = {
10
+ }, P = { class: "request-body-header" }, V = { class: "request-body-title" }, j = {
11
11
  key: 0,
12
12
  class: "request-body-required"
13
13
  }, S = {
@@ -19,28 +19,28 @@ const P = {
19
19
  }, T = {
20
20
  key: 1,
21
21
  class: "request-body-schema"
22
- }, b = 12, A = /* @__PURE__ */ h({
22
+ }, b = 12, A = /* @__PURE__ */ q({
23
23
  __name: "RequestBody",
24
24
  props: {
25
25
  breadcrumb: {},
26
26
  requestBody: {}
27
27
  },
28
- setup(d) {
28
+ setup(c) {
29
29
  var v;
30
30
  const y = m(
31
31
  () => {
32
32
  var e;
33
- return Object.keys(((e = d.requestBody) == null ? void 0 : e.content) ?? {});
33
+ return Object.keys(((e = c.requestBody) == null ? void 0 : e.content) ?? {});
34
34
  }
35
35
  ), l = f("application/json");
36
- (v = d.requestBody) != null && v.content && y.value.length > 0 && (l.value = y.value[0]);
36
+ (v = c.requestBody) != null && v.content && y.value.length > 0 && (l.value = y.value[0]);
37
37
  const r = m(
38
38
  () => {
39
39
  var e, o, t;
40
- return _((t = (o = (e = d.requestBody) == null ? void 0 : e.content) == null ? void 0 : o[l.value]) == null ? void 0 : t.schema);
40
+ return k((t = (o = (e = c.requestBody) == null ? void 0 : e.content) == null ? void 0 : o[l.value]) == null ? void 0 : t.schema);
41
41
  }
42
42
  ), i = m(() => {
43
- if (!r.value || !E(r.value))
43
+ if (!r.value || !O(r.value))
44
44
  return null;
45
45
  const e = Object.entries(r.value.properties ?? {});
46
46
  if (e.length <= b)
@@ -61,48 +61,51 @@ const P = {
61
61
  }
62
62
  };
63
63
  });
64
- return (e, o) => e.requestBody ? (a(), s("div", P, [
65
- q("div", V, [
66
- q("span", j, [
64
+ return (e, o) => e.requestBody ? (a(), s("div", E, [
65
+ h("div", P, [
66
+ h("span", V, [
67
67
  B(e.$slots, "title", {}, void 0, !0),
68
- e.requestBody.required ? (a(), s("div", O, " required ")) : u("", !0)
68
+ e.requestBody.required ? (a(), s("div", j, " required ")) : d("", !0)
69
69
  ]),
70
- n(R, {
70
+ n(_, {
71
71
  modelValue: l.value,
72
72
  "onUpdate:modelValue": o[0] || (o[0] = (t) => l.value = t),
73
73
  content: e.requestBody.content
74
74
  }, null, 8, ["modelValue", "content"]),
75
75
  e.requestBody.description ? (a(), s("div", S, [
76
- n(c(k), {
76
+ n(u(R), {
77
77
  value: e.requestBody.description
78
78
  }, null, 8, ["value"])
79
- ])) : u("", !0)
79
+ ])) : d("", !0)
80
80
  ]),
81
81
  i.value ? (a(), s("div", C, [
82
- n(c(p), {
82
+ n(u(p), {
83
83
  breadcrumb: e.breadcrumb,
84
84
  compact: "",
85
+ hideReadOnly: !0,
85
86
  name: "Request Body",
86
87
  noncollapsible: "",
87
88
  schema: i.value.visibleProperties
88
89
  }, null, 8, ["breadcrumb", "schema"]),
89
- n(c(p), {
90
+ n(u(p), {
90
91
  additionalProperties: "",
91
92
  breadcrumb: e.breadcrumb,
92
93
  compact: "",
94
+ hideReadOnly: !0,
93
95
  name: "Request Body",
94
96
  schema: i.value.collapsedProperties
95
97
  }, null, 8, ["breadcrumb", "schema"])
96
98
  ])) : r.value ? (a(), s("div", T, [
97
- n(c(p), {
99
+ n(u(p), {
98
100
  breadcrumb: e.breadcrumb,
99
101
  compact: "",
102
+ hideReadOnly: !0,
100
103
  name: "Request Body",
101
104
  noncollapsible: "",
102
105
  schema: r.value
103
106
  }, null, 8, ["breadcrumb", "schema"])
104
- ])) : u("", !0)
105
- ])) : u("", !0);
107
+ ])) : d("", !0)
108
+ ])) : d("", !0);
106
109
  }
107
110
  });
108
111
  export {