@scalar/api-reference 1.35.2 → 1.35.3

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 (165) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/browser/standalone.js +9896 -10062
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts +2 -1
  5. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReference.vue.js +14 -11
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  9. package/dist/components/ApiReferenceLayout.vue2.js +70 -72
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +3 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Content.vue.d.ts +0 -2
  13. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Content.vue.js +80 -80
  15. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +5 -2
  16. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  18. package/dist/components/Content/Models/ClassicLayout.vue2.js +43 -45
  19. package/dist/components/Content/Models/ClassicLayout.vue3.js +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  21. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/Models.vue.js +27 -20
  23. package/dist/components/Content/Models/ModernLayout.vue.d.ts +5 -2
  24. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  26. package/dist/components/Content/Models/ModernLayout.vue2.js +48 -52
  27. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -2
  28. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Operations/TraversedEntry.vue.js +33 -32
  30. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +2 -2
  31. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  33. package/dist/components/Content/Schema/Schema.vue.d.ts +6 -22
  34. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  36. package/dist/components/Content/Schema/Schema.vue2.js +86 -140
  37. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +15 -4
  38. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  39. package/dist/components/Content/Schema/SchemaComposition.vue.js +77 -138
  40. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +2 -13
  41. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +2 -2
  43. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +66 -92
  44. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  45. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Schema/SchemaHeading.vue.js +2 -2
  47. package/dist/components/Content/Schema/SchemaHeading.vue2.js +19 -17
  48. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +5 -14
  49. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +47 -68
  51. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -13
  52. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  54. package/dist/components/Content/Schema/SchemaProperty.vue2.js +116 -144
  55. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +1 -1
  56. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  57. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
  58. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +9 -4
  59. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  60. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  61. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +173 -204
  62. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +11 -0
  63. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -0
  64. package/dist/components/Content/Schema/helpers/get-ref-name.js +11 -0
  65. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +13 -3
  66. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
  67. package/dist/components/Content/Schema/helpers/get-schema-type.js +34 -13
  68. package/dist/components/Content/Schema/helpers/is-type-object.d.ts +4 -2
  69. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
  70. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -4
  71. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  72. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +130 -84
  73. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -5
  74. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  75. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +40 -31
  76. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +0 -8
  77. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -1
  78. package/dist/components/Content/Schema/helpers/schema-composition.js +2 -6
  79. package/dist/components/Content/Schema/helpers/schema-name.d.ts +8 -17
  80. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  81. package/dist/components/Content/Schema/helpers/schema-name.js +24 -33
  82. package/dist/features/Operation/Operation.vue.d.ts +3 -4
  83. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/Operation.vue.js +54 -73
  85. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +10 -11
  86. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ContentTypeSelect.vue.js +35 -43
  88. package/dist/features/Operation/components/{ParameterHeaders.vue.d.ts → Header.vue.d.ts} +4 -5
  89. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -0
  90. package/dist/features/Operation/components/Header.vue.js +23 -0
  91. package/dist/features/Operation/components/Header.vue2.js +4 -0
  92. package/dist/features/Operation/components/Headers.vue.d.ts +8 -0
  93. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -0
  94. package/dist/features/Operation/components/Headers.vue.js +7 -0
  95. package/dist/features/Operation/components/Headers.vue2.js +61 -0
  96. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -10
  97. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  98. package/dist/features/Operation/components/OperationParameters.vue.js +23 -33
  99. package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -6
  100. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  101. package/dist/features/Operation/components/OperationResponses.vue.js +22 -19
  102. package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -10
  103. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/components/ParameterList.vue.js +35 -5
  105. package/dist/features/Operation/components/ParameterList.vue2.js +2 -38
  106. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -10
  107. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  109. package/dist/features/Operation/components/ParameterListItem.vue2.js +77 -74
  110. package/dist/features/Operation/components/RequestBody.vue.d.ts +3 -8
  111. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  112. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  113. package/dist/features/Operation/components/RequestBody.vue2.js +75 -82
  114. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +0 -4
  115. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  116. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  117. package/dist/features/Operation/components/callbacks/Callback.vue2.js +35 -36
  118. package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
  119. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +0 -2
  120. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  121. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +13 -15
  122. package/dist/features/Operation/helpers/combine-params.d.ts +1 -1
  123. package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
  124. package/dist/features/Operation/helpers/combine-params.js +2 -2
  125. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -9
  126. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  127. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  128. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +75 -82
  129. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -10
  130. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  131. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  132. package/dist/features/Operation/layouts/ModernLayout.vue2.js +96 -103
  133. package/dist/index.js +1 -1
  134. package/dist/libs/openapi.d.ts +1 -13
  135. package/dist/libs/openapi.d.ts.map +1 -1
  136. package/dist/libs/openapi.js +39 -56
  137. package/dist/style.css +1 -1
  138. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +10 -4
  139. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  140. package/dist/v2/ApiReferenceWorkspace.vue.js +22 -18
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  143. package/package.json +12 -12
  144. package/dist/components/Content/Schema/Schema.preview.d.ts +0 -1078
  145. package/dist/components/Content/Schema/Schema.preview.d.ts.map +0 -1
  146. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +0 -12
  147. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  148. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -49
  149. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
  150. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +0 -13
  151. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +0 -1
  152. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +0 -1
  153. package/dist/features/Operation/components/ParameterHeaders.vue.js +0 -7
  154. package/dist/features/Operation/components/ParameterHeaders.vue2.js +0 -64
  155. package/dist/features/Operation/components/ParameterList.vue3.js +0 -4
  156. package/dist/features/Operation/hooks/useResponses.d.ts +0 -17
  157. package/dist/features/Operation/hooks/useResponses.d.ts.map +0 -1
  158. package/dist/features/Operation/hooks/useResponses.js +0 -19
  159. package/dist/hooks/useDiscriminator.d.ts +0 -53
  160. package/dist/hooks/useDiscriminator.d.ts.map +0 -1
  161. package/dist/hooks/useDiscriminator.js +0 -149
  162. package/dist/hooks/useOperationDiscriminator.d.ts +0 -8
  163. package/dist/hooks/useOperationDiscriminator.d.ts.map +0 -1
  164. package/dist/hooks/useOperationDiscriminator.js +0 -57
  165. /package/dist/features/Operation/components/{ParameterHeaders.vue3.js → Headers.vue3.js} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.preview.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.preview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyE/B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CnC,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1C,CAAA;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDlC,CAAA"}
@@ -1,12 +0,0 @@
1
- import type { DiscriminatorMapping } from '../../../hooks/useDiscriminator.js';
2
- type __VLS_Props = {
3
- discriminatorMapping: DiscriminatorMapping;
4
- discriminator: string;
5
- };
6
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- "update:modelValue": (value: string) => any;
8
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- export default _default;
12
- //# sourceMappingURL=SchemaDiscriminator.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAEpE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;;;;;;AAuHF,wBAOG"}
@@ -1,49 +0,0 @@
1
- import { defineComponent as p, ref as f, computed as n, createBlock as b, openBlock as g, unref as s, withCtx as v, createElementVNode as l, createVNode as x, toDisplayString as h } from "vue";
2
- import { ScalarListbox as V } from "@scalar/components";
3
- import { ScalarIconCaretDown as D } from "@scalar/icons";
4
- const S = {
5
- class: "bg-b-1.5 hover:bg-b-2 mt-2 flex w-full items-center gap-1 rounded border px-2 py-1.25",
6
- type: "button"
7
- }, _ = { class: "composition-selector-label text-c-1 relative" }, M = /* @__PURE__ */ p({
8
- __name: "SchemaDiscriminator",
9
- props: {
10
- discriminatorMapping: {},
11
- discriminator: {}
12
- },
13
- emits: ["update:modelValue"],
14
- setup(i, { emit: c }) {
15
- const m = f(""), d = c, u = (e) => {
16
- m.value = e, d("update:modelValue", e);
17
- }, a = n(() => i.discriminatorMapping ? Object.keys(i.discriminatorMapping).map((e) => ({
18
- id: e,
19
- label: e
20
- })) : []), o = n({
21
- get: () => a.value.find(
22
- (e) => e.id === i.discriminator
23
- ),
24
- set: (e) => {
25
- e != null && e.id && u(e.id);
26
- }
27
- });
28
- return (e, r) => (g(), b(s(V), {
29
- modelValue: o.value,
30
- "onUpdate:modelValue": r[0] || (r[0] = (t) => o.value = t),
31
- options: a.value,
32
- resize: ""
33
- }, {
34
- default: v(() => {
35
- var t;
36
- return [
37
- l("button", S, [
38
- l("span", _, h(((t = o.value) == null ? void 0 : t.label) || "Schema"), 1),
39
- x(s(D), { class: "z-1" })
40
- ])
41
- ];
42
- }),
43
- _: 1
44
- }, 8, ["modelValue", "options"]));
45
- }
46
- });
47
- export {
48
- M as default
49
- };
@@ -1,4 +0,0 @@
1
- import f from "./SchemaDiscriminator.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,13 +0,0 @@
1
- declare var __VLS_1: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_1) => any;
4
- };
5
- declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
- export default _default;
8
- type __VLS_WithSlots<T, S> = T & {
9
- new (): {
10
- $slots: S;
11
- };
12
- };
13
- //# sourceMappingURL=SchemaPropertyDescription.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SchemaPropertyDescription.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyDescription.vue"],"names":[],"mappings":"AAsBA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAkB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParameterHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterHeaders.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC,YAAY,CAAA;KAAE,CAAA;IACpD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AA4JF,wBAMG"}
@@ -1,7 +0,0 @@
1
- import r from "./ParameterHeaders.vue2.js";
2
- import "./ParameterHeaders.vue3.js";
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-96f30d93"]]);
5
- export {
6
- m as default
7
- };
@@ -1,64 +0,0 @@
1
- import { defineComponent as f, createBlock as m, openBlock as r, unref as s, withCtx as c, createElementVNode as u, normalizeClass as d, createVNode as o, createElementBlock as l, Fragment as i, createTextVNode as p, renderList as b } from "vue";
2
- import { Disclosure as v, DisclosureButton as _, DisclosurePanel as k } from "@headlessui/vue";
3
- import { ScalarIcon as B } from "@scalar/components";
4
- import H from "../../../components/Content/Schema/SchemaProperty.vue.js";
5
- const V = /* @__PURE__ */ f({
6
- __name: "ParameterHeaders",
7
- props: {
8
- headers: {},
9
- breadcrumb: {}
10
- },
11
- setup(S) {
12
- function h(e) {
13
- return e.schema !== void 0;
14
- }
15
- return (e, y) => (r(), m(s(v), null, {
16
- default: c(({ open: a }) => [
17
- u("div", {
18
- class: d(["headers-card headers-card--compact", [{ "headers-card--open": a }]])
19
- }, [
20
- u("div", {
21
- class: d(["headers-properties", { "headers-properties-open": a }])
22
- }, [
23
- o(s(_), {
24
- class: "headers-card-title headers-card-title--compact",
25
- style: {
26
- top: "calc(var(--refs-header-height)))"
27
- }
28
- }, {
29
- default: c(() => [
30
- o(s(B), {
31
- class: d(["headers-card-title-icon", { "headers-card-title-icon--open": a }]),
32
- icon: "Add",
33
- size: "sm"
34
- }, null, 8, ["class"]),
35
- a ? (r(), l(i, { key: 0 }, [
36
- p(" Hide Headers ")
37
- ], 64)) : (r(), l(i, { key: 1 }, [
38
- p(" Show Headers ")
39
- ], 64))
40
- ]),
41
- _: 2
42
- }, 1024),
43
- o(s(k), null, {
44
- default: c(() => [
45
- (r(!0), l(i, null, b(e.headers, (t, n) => (r(), m(H, {
46
- breadcrumb: e.breadcrumb ? [...e.breadcrumb, "headers"] : void 0,
47
- key: n,
48
- description: t.description,
49
- name: `${n}`,
50
- value: h(t) ? t.schema : void 0
51
- }, null, 8, ["breadcrumb", "description", "name", "value"]))), 128))
52
- ]),
53
- _: 1
54
- })
55
- ], 2)
56
- ], 2)
57
- ]),
58
- _: 1
59
- }));
60
- }
61
- });
62
- export {
63
- V as default
64
- };
@@ -1,4 +0,0 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
@@ -1,17 +0,0 @@
1
- import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { RequestBodyMimeTypes } from '@scalar/types/legacy';
3
- /**
4
- * Generates the responses for the request from the parameters in the OpenAPI document
5
- */
6
- export declare function useResponses(responses: OpenAPIV3_1.ResponseObject | undefined): {
7
- responses: import("vue").ComputedRef<{
8
- name: string;
9
- description: string;
10
- content: RequestBodyMimeTypes;
11
- headers?: {
12
- [key: string]: OpenAPI.HeaderObject;
13
- };
14
- schema?: OpenAPI.SchemaObject;
15
- }[]>;
16
- };
17
- //# sourceMappingURL=useResponses.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useResponses.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/hooks/useResponses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,cAAc,GAAG,SAAS;;cAGlE,MAAM;qBACC,MAAM;iBACV,oBAAoB;kBACnB;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAA;SAAE;iBACxC,OAAO,CAAC,YAAY;;EAoBlC"}
@@ -1,19 +0,0 @@
1
- import { computed as o } from "vue";
2
- function u(n) {
3
- return { responses: o(() => {
4
- const e = [];
5
- return n && Object.entries(n).forEach(([c, t]) => {
6
- var r;
7
- e.push({
8
- name: c,
9
- description: t.description,
10
- content: t.content,
11
- headers: t.headers,
12
- schema: (r = t.content) == null ? void 0 : r.schema
13
- });
14
- }), e;
15
- }) };
16
- }
17
- export {
18
- u as useResponses
19
- };
@@ -1,53 +0,0 @@
1
- import type { Schemas } from '../features/Operation/types/schemas';
2
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
- import { type InjectionKey, type ComputedRef } from 'vue';
4
- /** Discriminator context type */
5
- export type DiscriminatorContext = {
6
- selectedType: string | undefined;
7
- discriminatorMapping: Record<string, string>;
8
- discriminatorPropertyName: string;
9
- hasDiscriminator: boolean;
10
- mergedSchema: OpenAPIV3_1.SchemaObject | undefined;
11
- };
12
- /** Example context type */
13
- export type ExampleContext = {
14
- generateExampleValue: (isArray?: boolean) => any;
15
- };
16
- /** Injection keys */
17
- export declare const DISCRIMINATOR_CONTEXT: InjectionKey<ComputedRef<DiscriminatorContext | null>>;
18
- export declare const EXAMPLE_CONTEXT: InjectionKey<ExampleContext>;
19
- /** Discriminator mapping */
20
- export type DiscriminatorMapping = NonNullable<OpenAPIV3_1.DiscriminatorObject['mapping']>;
21
- /** Discriminator property name */
22
- export type DiscriminatorPropertyName = OpenAPIV3_1.DiscriminatorObject['propertyName'];
23
- /** Use discriminator options */
24
- export type UseDiscriminatorOptions = {
25
- schema: OpenAPIV3_1.SchemaObject | undefined;
26
- schemas?: Schemas;
27
- onSchemaChange?: (newSchema: OpenAPIV3_1.SchemaObject) => void;
28
- };
29
- /** Get discriminator mapping from schema */
30
- export declare function getDiscriminatorMapping(schema: OpenAPIV3_1.SchemaObject | undefined): DiscriminatorMapping | undefined;
31
- /** Get discriminator property name from schema */
32
- export declare function getDiscriminatorPropertyName(schema: OpenAPIV3_1.SchemaObject | undefined): DiscriminatorPropertyName | undefined;
33
- /** Check if schema has a discriminator */
34
- export declare function hasDiscriminator(schema: OpenAPIV3_1.SchemaObject | undefined): boolean;
35
- /** Get base discriminator schema name by matching discriminator property */
36
- export declare function getBaseDiscriminatorSchemaName(discriminatorPropertyName: string, schemas?: Schemas): string | null;
37
- /** Get base discriminator schema name for array items that might reference a discriminator schema */
38
- export declare function getDiscriminatorSchemaName(itemsSchema: OpenAPIV3_1.SchemaObject | undefined, schemas?: Schemas): string | null;
39
- /** Merge discriminator schemas */
40
- export declare function mergeDiscriminatorSchemas(baseSchema: OpenAPIV3_1.SchemaObject, selectedType: string, schemas: Record<string, OpenAPIV3_1.SchemaObject>): OpenAPIV3_1.SchemaObject | undefined;
41
- /** Use discriminator hook */
42
- export declare function useDiscriminator({ schema, schemas, onSchemaChange }: UseDiscriminatorOptions): {
43
- selectedType: import("vue").Ref<string, string>;
44
- discriminatorMapping: ComputedRef<{
45
- [value: string]: string;
46
- } | undefined>;
47
- defaultType: ComputedRef<string>;
48
- discriminatorPropertyName: ComputedRef<string | undefined>;
49
- hasDiscriminator: ComputedRef<boolean>;
50
- mergedSchema: ComputedRef<OpenAPIV3_1.SchemaObject | undefined>;
51
- generateExampleValue: (isArray?: boolean) => any;
52
- };
53
- //# sourceMappingURL=useDiscriminator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDiscriminator.d.ts","sourceRoot":"","sources":["../../src/hooks/useDiscriminator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAwB,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAA;AAE/E,iCAAiC;AACjC,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5C,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,EAAE,OAAO,CAAA;IACzB,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,SAAS,CAAA;CACnD,CAAA;AAED,2BAA2B;AAC3B,MAAM,MAAM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AAC,YAAY,GAAG,SAAS,EACjD,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,GAAG,IAAI,CAsBf;AAgBD,kCAAkC;AAClC,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,WAAW,CAAC,YAAY,EACpC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAChD,WAAW,CAAC,YAAY,GAAG,SAAS,CA6EtC;AAED,6BAA6B;AAC7B,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,uBAAuB;;;;;;;;;;EAuI5F"}
@@ -1,149 +0,0 @@
1
- import { computed as c, ref as q, watch as O } from "vue";
2
- const V = Symbol("discriminator-context"), w = Symbol("example-context");
3
- function j(r) {
4
- var e;
5
- if ((e = r == null ? void 0 : r.discriminator) != null && e.mapping)
6
- return r.discriminator.mapping;
7
- }
8
- function E(r) {
9
- var e;
10
- return (e = r == null ? void 0 : r.discriminator) == null ? void 0 : e.propertyName;
11
- }
12
- function D(r) {
13
- return (r == null ? void 0 : r.discriminator) !== void 0;
14
- }
15
- function I(r, e) {
16
- var o;
17
- if (!r || !e || r.type !== "object" || !r.properties)
18
- return null;
19
- for (const [p, i] of Object.entries(e))
20
- if (typeof i == "object" && i !== null && "discriminator" in i && ((o = i.discriminator) != null && o.propertyName)) {
21
- const n = i.discriminator.propertyName;
22
- if (r.properties[n])
23
- return p;
24
- }
25
- return null;
26
- }
27
- function x(r) {
28
- if (r)
29
- return r.type === "array" && r.items && typeof r.items == "object" && !("$ref" in r.items) ? r.items : r;
30
- }
31
- function T(r, e, o) {
32
- var l;
33
- if (!((l = r.discriminator) != null && l.mapping) || !e)
34
- return;
35
- const p = r.discriminator.mapping[e];
36
- if (!p)
37
- return;
38
- const i = p.split("/").pop();
39
- if (!i || !o[i])
40
- return;
41
- const n = o[i];
42
- if (n.allOf) {
43
- const d = {
44
- type: n.type || "object",
45
- properties: {},
46
- required: [],
47
- ...r.title ? { title: r.title } : {},
48
- ...r.name ? { name: r.name } : {}
49
- }, y = {}, a = /* @__PURE__ */ new Set();
50
- r.required && r.required.forEach((u) => a.add(u));
51
- for (const u of n.allOf)
52
- if ("$ref" in u) {
53
- const s = u.$ref.split("/").pop();
54
- if (s && o[s]) {
55
- const t = o[s];
56
- t.properties && Object.assign(y, t.properties), t.required && t.required.forEach((f) => a.add(f));
57
- }
58
- } else "properties" in u && (Object.assign(y, u.properties), "required" in u && Array.isArray(u.required) && u.required.forEach((s) => a.add(s)));
59
- return d.properties = y, d.required = Array.from(a), d;
60
- }
61
- return {
62
- type: n.type || r.type,
63
- properties: {
64
- ...r.properties || {},
65
- ...n.properties || {}
66
- },
67
- required: [...r.required || [], ...n.required || []],
68
- // Preserve discriminator
69
- discriminator: r.discriminator,
70
- // Preserve title and name from base schema
71
- ...r.title ? { title: r.title } : {},
72
- ...r.name ? { name: r.name } : {}
73
- };
74
- }
75
- function X({ schema: r, schemas: e, onSchemaChange: o }) {
76
- const p = c(() => x(r)), i = c(() => j(p.value)), n = c(() => i.value && Object.keys(i.value)[0] || ""), l = q(n.value);
77
- O(
78
- n,
79
- (t) => {
80
- t && !l.value && (l.value = t);
81
- },
82
- { immediate: !0 }
83
- );
84
- const d = c(() => E(p.value)), y = c(() => D(p.value)), a = c(() => {
85
- if (!p.value || !e || !l.value)
86
- return r;
87
- const t = T(
88
- p.value,
89
- l.value,
90
- e
91
- );
92
- if (!t)
93
- return r;
94
- const f = (r == null ? void 0 : r.type) === "array" ? {
95
- type: "array",
96
- items: t,
97
- ...r.title ? { title: r.title } : {},
98
- ...r.name ? { name: r.name } : {}
99
- } : t;
100
- return o == null || o(f), f;
101
- }), u = (t) => {
102
- if ("default" in t)
103
- return t.default;
104
- if ("example" in t)
105
- return t.example;
106
- switch (t.type) {
107
- case "string":
108
- return "";
109
- case "integer":
110
- case "number":
111
- return t.nullable ? null : 0;
112
- case "boolean":
113
- return !1;
114
- case "array":
115
- return [];
116
- case "object":
117
- return {};
118
- default:
119
- return null;
120
- }
121
- };
122
- return {
123
- selectedType: l,
124
- discriminatorMapping: i,
125
- defaultType: n,
126
- discriminatorPropertyName: d,
127
- hasDiscriminator: y,
128
- mergedSchema: a,
129
- generateExampleValue: (t = !1) => {
130
- if (!a.value)
131
- return t ? [] : {};
132
- const f = {}, v = a.value.type === "array" ? a.value.items : a.value;
133
- return "properties" in v && v.properties && Object.entries(v.properties).forEach(([g, N]) => {
134
- const m = N;
135
- m !== null && (f[g] = u(m));
136
- }), d.value && l.value && (f[d.value] = l.value), JSON.parse(JSON.stringify(t ? [f] : f));
137
- }
138
- };
139
- }
140
- export {
141
- V as DISCRIMINATOR_CONTEXT,
142
- w as EXAMPLE_CONTEXT,
143
- j as getDiscriminatorMapping,
144
- E as getDiscriminatorPropertyName,
145
- I as getDiscriminatorSchemaName,
146
- D as hasDiscriminator,
147
- T as mergeDiscriminatorSchemas,
148
- X as useDiscriminator
149
- };
@@ -1,8 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { Schemas } from '../features/Operation/types/schemas';
3
- /** Handling discriminator logic in operations */
4
- export declare function useOperationDiscriminator(operation?: OpenAPIV3_1.OperationObject, schemas?: Schemas): {
5
- hasSchemaDiscriminator: import("vue").ComputedRef<boolean>;
6
- handleDiscriminatorChange: (type: string) => void;
7
- };
8
- //# sourceMappingURL=useOperationDiscriminator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOperationDiscriminator.d.ts","sourceRoot":"","sources":["../../src/hooks/useOperationDiscriminator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAsBjE,iDAAiD;AACjD,wBAAgB,yBAAyB,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,eAAe,EAAE,OAAO,CAAC,EAAE,OAAO;;sCA6DzD,MAAM;EAahD"}
@@ -1,57 +0,0 @@
1
- import { computed as i, ref as T, provide as t } from "vue";
2
- import { useDiscriminator as C, DISCRIMINATOR_CONTEXT as d, EXAMPLE_CONTEXT as p } from "./useDiscriminator.js";
3
- function E(e) {
4
- return e ? !!(e.discriminator || e.type === "array" && e.items && typeof e.items == "object" && "discriminator" in e.items) : !1;
5
- }
6
- function j(e, f) {
7
- var c, m, o;
8
- const n = (o = (m = (c = e == null ? void 0 : e.requestBody) == null ? void 0 : c.content) == null ? void 0 : m["application/json"]) == null ? void 0 : o.schema, a = i(() => E(n)), h = a.value ? C({
9
- schema: n,
10
- schemas: f,
11
- onSchemaChange: (r) => {
12
- var u, l;
13
- (l = (u = e == null ? void 0 : e.requestBody) == null ? void 0 : u.content) != null && l["application/json"] && (e.requestBody.content["application/json"].schema = r);
14
- }
15
- }) : {
16
- selectedType: T(""),
17
- discriminatorMapping: i(() => ({})),
18
- discriminatorPropertyName: i(() => ""),
19
- hasDiscriminator: i(() => !1),
20
- mergedSchema: i(() => n),
21
- generateExampleValue: () => ({})
22
- }, {
23
- selectedType: s,
24
- discriminatorMapping: y,
25
- discriminatorPropertyName: g,
26
- hasDiscriminator: v,
27
- mergedSchema: D,
28
- generateExampleValue: S
29
- } = h;
30
- if (a.value) {
31
- const r = i(() => ({
32
- selectedType: s.value || void 0,
33
- discriminatorMapping: y.value || {},
34
- discriminatorPropertyName: g.value || "",
35
- hasDiscriminator: v.value,
36
- mergedSchema: D.value
37
- }));
38
- t(d, r), t(p, {
39
- generateExampleValue: S
40
- });
41
- } else
42
- t(
43
- d,
44
- i(() => null)
45
- ), t(p, {
46
- generateExampleValue: () => ({})
47
- });
48
- return {
49
- hasSchemaDiscriminator: a,
50
- handleDiscriminatorChange: (r) => {
51
- a.value && (s.value = r);
52
- }
53
- };
54
- }
55
- export {
56
- j as useOperationDiscriminator
57
- };