@mintlify/msft-sdk 1.1.62 → 1.1.64

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 (169) hide show
  1. package/dist/api-playground/ApiPlayground/Response/DownloadFileButton.js +6 -5
  2. package/dist/api-playground/ApiPlayground/Response/ResponseBody/CodeResponseContent.js +13 -12
  3. package/dist/api-playground/ApiPlayground/Response/ResponsePlaceholder.js +8 -7
  4. package/dist/api-playground/ApiPlayground/Response/ResponseTable.js +3 -2
  5. package/dist/api-playground/ApiPlayground/Response/ResponseTopbar.js +9 -8
  6. package/dist/api-playground/ApiPlayground/Response/index.js +4 -3
  7. package/dist/api-playground/ApiPlayground/components/AdditionalPropertyButton.js +42 -21
  8. package/dist/api-playground/ApiPlayground/components/ParamFieldWrapper.js +13 -9
  9. package/dist/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +7 -6
  10. package/dist/api-playground/ApiPlayground/components/SendPill.js +3 -2
  11. package/dist/api-playground/ApiPlayground/components/TypeDropdown.js +6 -5
  12. package/dist/api-playground/EndpointFields/ParamFields/ExampleDescription.js +3 -2
  13. package/dist/api-playground/EndpointFields/components/Description.js +6 -5
  14. package/dist/api-playground/EndpointFields/components/OptionDropdown.js +9 -8
  15. package/dist/api-playground/EndpointFields/components/SectionHeading.js +8 -7
  16. package/dist/api-playground-2/ApiExamples.js +19 -20
  17. package/dist/api-playground-2/ApiFields.js +20 -247
  18. package/dist/api-playground-2/EndpointHeader.js +59 -47
  19. package/dist/api-playground-2/OperationPage.js +70 -67
  20. package/dist/api-playground-2/Playground.js +67 -83
  21. package/dist/api-playground-2/SchemaPage.js +22 -9
  22. package/dist/api-playground-2/components/EndpointFields/Body.js +40 -0
  23. package/dist/api-playground-2/components/EndpointFields/Parameters.js +90 -0
  24. package/dist/api-playground-2/components/EndpointFields/Response.js +146 -0
  25. package/dist/api-playground-2/components/EndpointFields/Security.js +88 -0
  26. package/dist/api-playground-2/components/EndpointFields/fields/ArrayParamField.js +93 -0
  27. package/dist/api-playground-2/components/EndpointFields/fields/Enum.js +29 -11
  28. package/dist/api-playground-2/components/EndpointFields/fields/ObjectParamField.js +145 -0
  29. package/dist/api-playground-2/components/EndpointFields/fields/PrimitiveParamField.js +60 -48
  30. package/dist/api-playground-2/components/EndpointFields/fields/SchemaField.js +230 -0
  31. package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +93 -89
  32. package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +18 -17
  33. package/dist/api-playground-2/components/Example/RequestExample.js +92 -93
  34. package/dist/api-playground-2/components/Example/ResponseExample.js +19 -15
  35. package/dist/api-playground-2/components/Request/ParameterSection.js +20 -18
  36. package/dist/api-playground-2/components/Request/SecuritySection.js +53 -43
  37. package/dist/api-playground-2/components/Request/inputs/ArrayInput.js +89 -40
  38. package/dist/api-playground-2/components/Request/inputs/DifferentiatedInput.js +12 -12
  39. package/dist/api-playground-2/components/Request/inputs/FileInput.js +16 -15
  40. package/dist/api-playground-2/components/Request/inputs/InputContainer.js +76 -57
  41. package/dist/api-playground-2/components/Request/inputs/NumberInput.js +10 -9
  42. package/dist/api-playground-2/components/Request/inputs/ObjectInput.js +98 -80
  43. package/dist/api-playground-2/components/Request/inputs/OneOfInput.js +55 -47
  44. package/dist/api-playground-2/components/Request/inputs/SelectInput.js +18 -17
  45. package/dist/api-playground-2/components/Request/inputs/StringInput.js +19 -18
  46. package/dist/api-playground-2/components/Request/inputs/TextInput.js +12 -11
  47. package/dist/api-playground-2/components/SendPillWrapper.js +35 -0
  48. package/dist/api-playground-2/contexts/ApiPlaygroundContext.js +3 -5
  49. package/dist/api-playground-2/generators/createCookies.js +23 -0
  50. package/dist/api-playground-2/generators/createHeaders.js +53 -36
  51. package/dist/api-playground-2/generators/createQueryString.js +30 -0
  52. package/dist/api-playground-2/generators/generateAuthPlaceholder.js +14 -0
  53. package/dist/api-playground-2/generators/generateInteractiveCodeSample.js +27 -25
  54. package/dist/api-playground-2/generators/generateRequest.js +47 -51
  55. package/dist/api-playground-2/generators/generateResponseExampleMap.js +15 -11
  56. package/dist/api-playground-2/generators/generateSnippetMap.js +13 -11
  57. package/dist/api-playground-2/hooks/useCopyPathWithInputs.js +11 -11
  58. package/dist/api-playground-2/hooks/useInitializeInputs.js +185 -88
  59. package/dist/api-playground-2/hooks/usePlaygroundInputsStore.js +70 -25
  60. package/dist/api-playground-2/hooks/useSelectedBaseUrl.js +13 -0
  61. package/dist/api-playground-2/hooks/useSelectedExample.js +10 -0
  62. package/dist/api-playground-2/hooks/useSelectedRequestBodyContentType.js +12 -0
  63. package/dist/api-playground-2/hooks/useSelectedResponseContentType.js +12 -0
  64. package/dist/api-playground-2/hooks/useSelectedSecurityOption.js +31 -0
  65. package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +114 -101
  66. package/dist/api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js +23 -32
  67. package/dist/api-playground-2/schemaGraph/addTypeLabelsToSchema.js +50 -0
  68. package/dist/api-playground-2/schemaGraph/addUniqueKeysToSchema.js +40 -24
  69. package/dist/api-playground-2/schemaGraph/getExampleBodyInputs.js +94 -0
  70. package/dist/api-playground-2/schemaGraph/getSchemaGraphOperationData.js +56 -50
  71. package/dist/api-playground-2/schemaGraph/processExamples.js +117 -52
  72. package/dist/api-playground-2/schemaGraph/processSchema.js +10 -0
  73. package/dist/api-playground-2/schemaGraph/processSecurityOptions.js +58 -28
  74. package/dist/api-playground-2/schemaGraph/reduceCompositions.js +220 -181
  75. package/dist/api-playground-2/schemaGraph/resolveOperationWithDependencies.js +128 -89
  76. package/dist/api-playground-2/schemaGraph/resolveSchemaWithDependencies.js +15 -16
  77. package/dist/api-playground-2/schemaGraph/sortSchemaByRequired.js +14 -12
  78. package/dist/api-playground-2/schemaGraph/utils.js +185 -147
  79. package/dist/common/guards.js +11 -19
  80. package/dist/components/Api/Expandable.js +10 -9
  81. package/dist/components/Api/Param.js +11 -13
  82. package/dist/components/Api/dropdown-menu.js +10 -9
  83. package/dist/components/apiPage.js +125 -0
  84. package/dist/components/content-components/code-group.js +4 -4
  85. package/dist/components/docsPage.js +54 -56
  86. package/dist/contexts/EndpointLocationContext.js +3 -3
  87. package/dist/hooks/useApiParamFieldOption.js +10 -0
  88. package/dist/hooks/useEndpoint.js +3 -3
  89. package/dist/hooks/useKeyboardShortcut.js +13 -13
  90. package/dist/hooks/useSendPlaygroundRequest.js +14 -146
  91. package/dist/index.d.ts +80 -60
  92. package/dist/index.js +99 -101
  93. package/dist/openapi/generateTypeStringFromSchema.js +2 -31
  94. package/dist/plugins/sanitize/rehype-pre-to-mdx-fence.js +13 -13
  95. package/dist/styles.css +1 -1
  96. package/package.json +1 -1
  97. package/dist/api-playground/ApiPlayground/Request/BodySection.js +0 -64
  98. package/dist/api-playground/ApiPlayground/Request/ParameterSection.js +0 -32
  99. package/dist/api-playground/ApiPlayground/Request/PlaygroundModal.js +0 -201
  100. package/dist/api-playground/ApiPlayground/Request/SecuritySection.js +0 -146
  101. package/dist/api-playground/ApiPlayground/Request/ServerSection.js +0 -30
  102. package/dist/api-playground/ApiPlayground/Request/index.js +0 -43
  103. package/dist/api-playground/ApiPlayground/Request/inputs/ArrayInput.js +0 -93
  104. package/dist/api-playground/ApiPlayground/Request/inputs/DifferentiatedInput.js +0 -90
  105. package/dist/api-playground/ApiPlayground/Request/inputs/FileInput.js +0 -62
  106. package/dist/api-playground/ApiPlayground/Request/inputs/NullInput.js +0 -33
  107. package/dist/api-playground/ApiPlayground/Request/inputs/NumberInput.js +0 -61
  108. package/dist/api-playground/ApiPlayground/Request/inputs/ObjectChildren.js +0 -109
  109. package/dist/api-playground/ApiPlayground/Request/inputs/ObjectInput.js +0 -87
  110. package/dist/api-playground/ApiPlayground/Request/inputs/RecursiveInput.js +0 -61
  111. package/dist/api-playground/ApiPlayground/Request/inputs/SelectInput.js +0 -54
  112. package/dist/api-playground/ApiPlayground/Request/inputs/StringInput.js +0 -67
  113. package/dist/api-playground/ApiPlayground/Request/inputs/TextInput.js +0 -44
  114. package/dist/api-playground/ApiPlayground/components/EndpointsMenu.js +0 -42
  115. package/dist/api-playground/ApiPlayground/components/EndpointsMenuLink.js +0 -43
  116. package/dist/api-playground/ApiPlayground/components/EndpointsMenuSearch.js +0 -38
  117. package/dist/api-playground/ApiPlayground/components/InputContainer.js +0 -128
  118. package/dist/api-playground/ApiPlayground/components/InputSectionContainer.js +0 -59
  119. package/dist/api-playground/ApiPlayground/components/PathHeader.js +0 -162
  120. package/dist/api-playground/ApiPlayground/components/TrashButton.js +0 -26
  121. package/dist/api-playground/ApiPlayground/index.js +0 -67
  122. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js +0 -19
  123. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js +0 -18
  124. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js +0 -28
  125. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/index.js +0 -5
  126. package/dist/api-playground/EndpointFields/ParamFields/RecursiveParamField.js +0 -13
  127. package/dist/api-playground/EndpointFields/index.js +0 -7
  128. package/dist/api-playground-2/components/EndpointFields/EndpointSecurity.js +0 -87
  129. package/dist/api-playground-2/components/EndpointFields/fields/SimpleArrayParamField.js +0 -89
  130. package/dist/api-playground-2/components/EndpointFields/fields/SimpleObjectParamField.js +0 -121
  131. package/dist/api-playground-2/components/EndpointFields/fields/SimplePrimitiveParamField.js +0 -74
  132. package/dist/api-playground-2/components/EndpointFields/fields/SimpleSchemaField.js +0 -252
  133. package/dist/common/potentiallyParseOpenApiString.js +0 -24
  134. package/dist/common/replaceSlashIndex.js +0 -6
  135. package/dist/common/slugToTitle.js +0 -10
  136. package/dist/constants/prism-languages.js +0 -19
  137. package/dist/contexts/ApiPlaygroundInputsContext.js +0 -17
  138. package/dist/contexts/MDXContentContext.js +0 -17
  139. package/dist/hooks/useApiPlaygroundInputs.js +0 -6
  140. package/dist/hooks/useApiPlaygroundPrefillExamples.js +0 -39
  141. package/dist/hooks/useBaseUrlOptions.js +0 -18
  142. package/dist/hooks/useComponentSchemas.js +0 -9
  143. package/dist/hooks/useGenerateNextAdditionalProperties.js +0 -11
  144. package/dist/hooks/useGenerateNextItems.js +0 -11
  145. package/dist/hooks/useGenerateNextProperties.js +0 -11
  146. package/dist/hooks/useMDXContent.js +0 -6
  147. package/dist/hooks/useMDXContentController/useApiPlaygroundInputs.js +0 -9
  148. package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiBaseIndexCallback.js +0 -15
  149. package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiPlaygroundInputsCallback.js +0 -15
  150. package/dist/hooks/usePlaygroundSchemaOptions.js +0 -42
  151. package/dist/hooks/usePrefilledInputs/index.js +0 -65
  152. package/dist/hooks/usePrefilledInputs/storedServerVariables.js +0 -29
  153. package/dist/hooks/useSecurityOption.js +0 -10
  154. package/dist/hooks/useSetDefaultValue.js +0 -63
  155. package/dist/openapi/filterEnums.js +0 -20
  156. package/dist/openapi/generateNextAdditionalProperties.js +0 -7
  157. package/dist/openapi/generateNextItems.js +0 -7
  158. package/dist/openapi/generateNextProperties.js +0 -23
  159. package/dist/openapi/generateOptionLabels.js +0 -20
  160. package/dist/openapi/generateSimpleLabels.js +0 -4
  161. package/dist/openapi/getAuthFilteredSchemaArray.js +0 -18
  162. package/dist/paths/isEqualIgnoringLeadingSlash.js +0 -21
  163. package/dist/paths/optionallyRemoveLeadingSlash.js +0 -6
  164. package/dist/paths/optionallyRemoveTrailingSlash.js +0 -6
  165. package/dist/utils/api-playground/defaults.js +0 -15
  166. package/dist/utils/api-playground/paramFieldDefaults.js +0 -10
  167. package/dist/utils/api-reference/getFilteredSecurityOptions.js +0 -4
  168. package/dist/utils/api-reference/getNextPropertiesByType.js +0 -5
  169. package/dist/utils/flattenObject.js +0 -10
@@ -1,148 +1,187 @@
1
- import { CIRCULAR_REF_KEY as b } from "../constants/index.js";
2
- import { reduceExpandedSchema as h } from "./reduceCompositions.js";
3
- import { sortSchemaByRequired as l } from "./sortSchemaByRequired.js";
4
- import { flattenSingleOneOf as v, isSchemaObject as u, isCircularRef as j } from "./utils.js";
5
- import { addUniqueKeysToSchema as p } from "./addUniqueKeysToSchema.js";
6
- import { generateExamplesFromSchema as q } from "./processExamples.js";
7
- import { resolveGraphNode as R, deeplyResolveGraphNode as d } from "./resolveGraphNode.js";
8
- const _ = ({
9
- operationId: m,
1
+ import { CIRCULAR_REF_KEY as d } from "../constants/index.js";
2
+ import { reduceExpandedSchema as u } from "./reduceCompositions.js";
3
+ import { sortSchemaByRequired as w } from "./sortSchemaByRequired.js";
4
+ import { flattenSingleOneOf as y, isSchemaObject as v, isCircularRef as C } from "./utils.js";
5
+ import { generateExamplesFromSchema as b } from "./processExamples.js";
6
+ import { processSchema as E } from "./processSchema.js";
7
+ import { resolveGraphNode as g, deeplyResolveGraphNode as p } from "./resolveGraphNode.js";
8
+ const z = ({
9
+ pathUuid: c,
10
+ operationId: i,
10
11
  uuidObjectHashMap: o,
11
- hashedNodeMap: n
12
+ hashedNodeMap: e
12
13
  }) => {
13
- const e = R({
14
+ const t = g({
14
15
  uuidObjectHashMap: o,
15
- hashedNodeMap: n,
16
- id: m
16
+ hashedNodeMap: e,
17
+ id: i
17
18
  });
18
- if (!e)
19
+ if (!t)
19
20
  return;
20
- const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), c = e.parameters;
21
- c == null || c.forEach((a) => {
22
- if (typeof a != "string") return;
23
- const f = B(a, o, n);
24
- f && "name" in f && "in" in f && t.set(a, f);
21
+ const r = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), m = t.parameters;
22
+ if (m == null || m.forEach((s) => {
23
+ if (typeof s != "string") return;
24
+ const n = j(s, o, e);
25
+ n && "name" in n && "in" in n && r.set(s, n);
26
+ }), c) {
27
+ const s = g({
28
+ uuidObjectHashMap: o,
29
+ hashedNodeMap: e,
30
+ id: c
31
+ });
32
+ s && s.parameters && s.parameters.forEach((n) => {
33
+ if (typeof n != "string") return;
34
+ const h = j(n, o, e);
35
+ h && "name" in h && "in" in h && r.set(n, h);
36
+ });
37
+ }
38
+ const S = t.security;
39
+ S == null || S.forEach((s) => {
40
+ if (typeof s != "string") return;
41
+ const n = G(s, o, e);
42
+ n && l.set(s, n);
25
43
  });
26
- let s;
27
- const i = e.requestBody;
28
- i && typeof i == "string" && (s = g(i, o, n), s && (s.content = q(s.content)));
29
- const E = e.responses;
30
- E && Object.values(E).forEach((a) => {
31
- if (typeof a != "string") return;
32
- const f = y(a, o, n);
33
- f && f.content && (f.content = q(f.content)), f && r.set(a, f);
44
+ let a;
45
+ const q = t.requestBody;
46
+ if (q && typeof q == "string" && (a = A(q, o, e), a)) {
47
+ const { content: s, exampleType: n } = b(a.content);
48
+ a.content = s, a.exampleType = n;
49
+ }
50
+ const O = t.responses;
51
+ O && Object.values(O).forEach((s) => {
52
+ if (typeof s != "string") return;
53
+ const n = F(s, o, e);
54
+ if (n && n.content) {
55
+ const { content: h, exampleType: B } = b(n.content);
56
+ n.content = h, n.exampleType = B;
57
+ }
58
+ n && f.set(s, n);
34
59
  });
35
- const O = {
36
- operation: e,
37
- parameters: Object.fromEntries(t),
38
- requestBody: s,
39
- responses: Object.fromEntries(r)
40
- }, S = C(O, o, n);
60
+ const x = {
61
+ operation: t,
62
+ parameters: Object.fromEntries(r),
63
+ requestBody: a,
64
+ responses: Object.fromEntries(f),
65
+ security: Object.fromEntries(l)
66
+ }, R = _(x, o, e);
41
67
  return {
42
- operation: e,
68
+ operation: t,
43
69
  dependencies: {
44
- parameters: Object.fromEntries(t),
45
- requestBody: s,
46
- responses: Object.fromEntries(r)
70
+ parameters: Object.fromEntries(r),
71
+ requestBody: a,
72
+ responses: Object.fromEntries(f),
73
+ security: Object.fromEntries(l)
47
74
  },
48
- schemas: Object.keys(S).length > 0 ? S : void 0
75
+ schemas: Object.keys(R).length > 0 ? R : void 0
49
76
  };
50
77
  };
51
- function g(m, o, n) {
52
- let e = d({
53
- uuidObjectHashMap: o,
54
- hashedNodeMap: n,
55
- id: m
78
+ function A(c, i, o) {
79
+ let e = p({
80
+ uuidObjectHashMap: i,
81
+ hashedNodeMap: o,
82
+ id: c
56
83
  });
57
84
  if (e)
58
- return e = v(e), Object.values(e.content).forEach((t) => {
59
- if (t.schema && u(t.schema)) {
60
- let r = h({
85
+ return e = y(e), Object.values(e.content).forEach((t) => {
86
+ if (t.schema && v(t.schema)) {
87
+ let r = u({
61
88
  schema: t.schema,
62
89
  depth: 0,
63
90
  location: "request"
64
91
  });
65
- r = l(r), r = p(r, ""), t.schema = r;
92
+ r = E(r), t.schema = r;
66
93
  }
67
94
  }), e;
68
95
  }
69
- function y(m, o, n) {
70
- let e = d({
71
- uuidObjectHashMap: o,
72
- hashedNodeMap: n,
73
- id: m
96
+ function F(c, i, o) {
97
+ let e = p({
98
+ uuidObjectHashMap: i,
99
+ hashedNodeMap: o,
100
+ id: c
74
101
  });
75
102
  if (e)
76
- return e = v(e), e.content && Object.values(e.content).forEach((t) => {
77
- if (t.schema && u(t.schema)) {
78
- let r = h({
103
+ return e = y(e), e.content && Object.values(e.content).forEach((t) => {
104
+ if (t.schema && v(t.schema)) {
105
+ let r = u({
79
106
  schema: t.schema,
80
107
  depth: 0,
81
108
  location: "response"
82
109
  });
83
- r = l(r), r = p(r, ""), t.schema = r;
110
+ r = E(r), t.schema = r;
84
111
  }
85
112
  }), e;
86
113
  }
87
- function B(m, o, n) {
88
- let e = d({
89
- uuidObjectHashMap: o,
90
- hashedNodeMap: n,
91
- id: m
114
+ function j(c, i, o) {
115
+ let e = p({
116
+ uuidObjectHashMap: i,
117
+ hashedNodeMap: o,
118
+ id: c
92
119
  });
93
120
  if (e) {
94
- if (e = v(e), "schema" in e && e.schema && u(e.schema)) {
95
- let t = h({
121
+ if (e = y(e), "schema" in e && e.schema && v(e.schema)) {
122
+ let t = u({
96
123
  schema: e.schema,
97
124
  depth: 0,
98
125
  location: "request"
99
126
  });
100
- t = l(t), t = p(t, ""), e.schema = t;
127
+ t = {
128
+ ...t,
129
+ isRequired: e.required
130
+ }, t = E(t), e.schema = t;
101
131
  }
102
132
  return "content" in e && e.content && Object.values(e.content).forEach((t) => {
103
- if (t.schema && u(t.schema)) {
104
- let r = h({
133
+ if (t.schema && v(t.schema)) {
134
+ let r = u({
105
135
  schema: t.schema,
106
136
  depth: 0,
107
137
  location: "request"
108
138
  });
109
- r = l(r), r = p(r, ""), t.schema = r;
139
+ r = E(r), t.schema = r;
110
140
  }
111
141
  }), e;
112
142
  }
113
143
  }
114
- function C(m, o, n, e = /* @__PURE__ */ new Set()) {
115
- const t = {}, r = (c) => {
116
- if (c != null) {
117
- if (j(c)) {
118
- const s = c[b];
119
- if (!e.has(s)) {
120
- e.add(s);
121
- let i = d({
122
- uuidObjectHashMap: o,
123
- hashedNodeMap: n,
124
- id: s
144
+ function G(c, i, o) {
145
+ let e = p({
146
+ uuidObjectHashMap: i,
147
+ hashedNodeMap: o,
148
+ id: c
149
+ });
150
+ if (e)
151
+ return e = y(e), e;
152
+ }
153
+ function _(c, i, o, e = /* @__PURE__ */ new Set()) {
154
+ const t = {}, r = (f) => {
155
+ if (f != null) {
156
+ if (C(f)) {
157
+ const l = f[d];
158
+ if (!e.has(l)) {
159
+ e.add(l);
160
+ let m = p({
161
+ uuidObjectHashMap: i,
162
+ hashedNodeMap: o,
163
+ id: l
125
164
  });
126
- if (!i) return;
127
- i = h({
128
- schema: i,
165
+ if (!m) return;
166
+ m = u({
167
+ schema: m,
129
168
  depth: 0,
130
169
  location: "request"
131
- }), i = l(i), t[s] = i, r(i);
170
+ }), m = w(m), t[l] = m, r(m);
132
171
  }
133
172
  return;
134
173
  }
135
- if (Array.isArray(c)) {
136
- c.forEach(r);
174
+ if (Array.isArray(f)) {
175
+ f.forEach(r);
137
176
  return;
138
177
  }
139
- if (typeof c == "object")
140
- for (const s of Object.values(c))
141
- r(s);
178
+ if (typeof f == "object")
179
+ for (const l of Object.values(f))
180
+ r(l);
142
181
  }
143
182
  };
144
- return r(m), t;
183
+ return r(c), t;
145
184
  }
146
185
  export {
147
- _ as resolveOperationWithDependencies
186
+ z as resolveOperationWithDependencies
148
187
  };
@@ -1,32 +1,31 @@
1
- import { addUniqueKeysToSchema as i } from "./addUniqueKeysToSchema.js";
2
- import { reduceExpandedSchema as n } from "./reduceCompositions.js";
3
- import { deeplyResolveGraphNode as t } from "./resolveGraphNode.js";
4
- import { sortSchemaByRequired as c } from "./sortSchemaByRequired.js";
5
- function p(o, r) {
6
- const d = r.spec.refUuidMap[o];
7
- if (d)
8
- return d;
1
+ import { reduceExpandedSchema as d } from "./reduceCompositions.js";
2
+ import { deeplyResolveGraphNode as i } from "./resolveGraphNode.js";
3
+ import { processSchema as t } from "./processSchema.js";
4
+ function c(o, r) {
5
+ const n = r.spec.refUuidMap[o];
6
+ if (n)
7
+ return n;
9
8
  }
10
- function a({
9
+ function u({
11
10
  schemaPath: o,
12
11
  schemaGraphData: r
13
12
  }) {
14
- const d = p(o, r);
15
- if (!d)
13
+ const n = c(o, r);
14
+ if (!n)
16
15
  throw new Error(`no matching OpenAPI schema found with path "${o}"`);
17
- let e = t({
16
+ let e = i({
18
17
  uuidObjectHashMap: r.spec.uuidObjectHashMap,
19
18
  hashedNodeMap: r.spec.hashedNodeMap,
20
- id: d
19
+ id: n
21
20
  });
22
21
  if (!e)
23
22
  throw new Error(`no matching OpenAPI schema found with id "${o}"`);
24
- return e = n({
23
+ return e = d({
25
24
  schema: e,
26
25
  depth: 0,
27
26
  location: "request"
28
- }), e = c(e), e = i(e, ""), e;
27
+ }), e = t(e), e;
29
28
  }
30
29
  export {
31
- a as resolveSchemaWithDependencies
30
+ u as resolveSchemaWithDependencies
32
31
  };
@@ -2,26 +2,28 @@ import { isSchemaObject as o } from "./utils.js";
2
2
  const u = (r) => {
3
3
  if (!o(r))
4
4
  return r;
5
- if (r.oneOf && Array.isArray(r.oneOf))
5
+ if (r.oneOf && Array.isArray(r.oneOf) && r.oneOf.length > 0)
6
6
  return {
7
7
  ...r,
8
8
  oneOf: r.oneOf.map(
9
- (t) => o(t) ? u(t) : t
9
+ (e) => r.isRequired ? { ...e, isRequired: !0 } : e
10
+ ).map(
11
+ (e) => o(e) ? u(e) : e
10
12
  )
11
13
  };
12
14
  if (r.type === "object" && r.properties) {
13
- const t = new Set(r.required || []), d = Object.entries(r.properties).filter(
14
- (e) => o(e[1])
15
- ).sort(([e], [i]) => {
16
- const n = t.has(e), s = t.has(i);
17
- return n === s ? 0 : n ? -1 : 1;
18
- }), f = {};
19
- return d.forEach(([e, i]) => {
20
- const n = t.has(e), s = o(i) ? u(i) : i;
21
- f[e] = n ? { ...s, isRequired: !0 } : s;
15
+ const e = new Set(r.required || []), f = Object.entries(r.properties).filter(
16
+ (t) => o(t[1])
17
+ ).sort(([t], [n]) => {
18
+ const s = e.has(t), i = e.has(n);
19
+ return s === i ? 0 : s ? -1 : 1;
20
+ }), d = {};
21
+ return f.forEach(([t, n]) => {
22
+ const i = e.has(t) ? { ...n, isRequired: !0 } : n, p = o(i) ? u(i) : i;
23
+ d[t] = p;
22
24
  }), {
23
25
  ...r,
24
- properties: f
26
+ properties: d
25
27
  };
26
28
  }
27
29
  return r.type === "array" && o(r.items) ? {