@scalar/api-reference 1.49.3 → 1.49.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 (655) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/blocks/index.js +4 -2
  4. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +9 -0
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -0
  7. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +106 -0
  8. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -0
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +9 -0
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -0
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +121 -0
  12. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -0
  13. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +27 -0
  14. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -0
  15. package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
  16. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +9 -0
  17. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -0
  18. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +55 -0
  19. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -0
  20. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +7 -0
  21. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -0
  22. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +69 -0
  23. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -0
  24. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +9 -0
  25. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js.map +1 -0
  26. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +68 -0
  27. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -0
  28. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -0
  29. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -0
  30. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +40 -0
  31. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -0
  32. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +7 -0
  33. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -0
  34. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +35 -0
  35. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -0
  36. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +7 -0
  37. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js.map +1 -0
  38. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +25 -0
  39. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -0
  40. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +9 -0
  41. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -0
  42. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +15 -0
  43. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -0
  44. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
  45. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -0
  46. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +9 -0
  47. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -0
  48. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +92 -0
  49. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -0
  50. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +7 -0
  51. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js.map +1 -0
  52. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js +19 -0
  53. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js.map +1 -0
  54. package/dist/blocks/scalar-info-block/index.d.ts +2 -2
  55. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +7 -0
  56. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -0
  57. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +71 -0
  58. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -0
  59. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -0
  60. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -0
  61. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +69 -0
  62. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -0
  63. package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
  64. package/dist/browser/standalone.js +2310 -45326
  65. package/dist/browser/webpack-stats.json +1 -1
  66. package/dist/components/AgentScalar/AgentScalarButton.vue.js +7 -0
  67. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -0
  68. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +21 -0
  69. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -0
  70. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.d.ts +2 -1
  71. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.d.ts.map +1 -1
  72. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +7 -0
  73. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -0
  74. package/dist/{AgentScalarChatInterface-MUbtSqMw.js → components/AgentScalar/AgentScalarChatInterface.vue.script.js} +10 -9
  75. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -0
  76. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +2 -4
  77. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  78. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +9 -0
  79. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -0
  80. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +67 -0
  81. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -0
  82. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts +2 -0
  83. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  84. package/dist/components/AgentScalar/OpenMCPButton.vue.js +9 -0
  85. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -0
  86. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +184 -0
  87. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -0
  88. package/dist/components/AgentScalar/index.d.ts +3 -3
  89. package/dist/components/Anchor/Anchor.vue.js +7 -0
  90. package/dist/components/Anchor/Anchor.vue.js.map +1 -0
  91. package/dist/components/Anchor/Anchor.vue.script.js +40 -0
  92. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -0
  93. package/dist/components/Anchor/WithBreadcrumb.vue.js +7 -0
  94. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -0
  95. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +32 -0
  96. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -0
  97. package/dist/components/Anchor/index.d.ts +2 -2
  98. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  99. package/dist/components/ApiReference.vue.js +12 -0
  100. package/dist/components/ApiReference.vue.js.map +1 -0
  101. package/dist/components/ApiReference.vue.script.js +668 -0
  102. package/dist/components/ApiReference.vue.script.js.map +1 -0
  103. package/dist/components/Badge/Badge.vue.js +9 -0
  104. package/dist/components/Badge/Badge.vue.js.map +1 -0
  105. package/dist/components/Badge/Badge.vue.script.js +22 -0
  106. package/dist/components/Badge/Badge.vue.script.js.map +1 -0
  107. package/dist/components/Badge/index.d.ts +1 -1
  108. package/dist/components/ClassicHeader.vue.js +16 -0
  109. package/dist/components/ClassicHeader.vue.js.map +1 -0
  110. package/dist/components/Content/Auth/Auth.vue.js +7 -0
  111. package/dist/components/Content/Auth/Auth.vue.js.map +1 -0
  112. package/dist/components/Content/Auth/Auth.vue.script.js +70 -0
  113. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -0
  114. package/dist/components/Content/Auth/helpers/get-default-security.js +64 -0
  115. package/dist/components/Content/Auth/helpers/get-default-security.js.map +1 -0
  116. package/dist/components/Content/Auth/index.d.ts +1 -1
  117. package/dist/components/Content/Content.vue.js +8 -0
  118. package/dist/components/Content/Content.vue.js.map +1 -0
  119. package/dist/components/Content/Content.vue.script.js +192 -0
  120. package/dist/components/Content/Content.vue.script.js.map +1 -0
  121. package/dist/components/Content/Models/Model.vue.js +7 -0
  122. package/dist/components/Content/Models/Model.vue.js.map +1 -0
  123. package/dist/components/Content/Models/Model.vue.script.js +61 -0
  124. package/dist/components/Content/Models/Model.vue.script.js.map +1 -0
  125. package/dist/components/Content/Models/ModelTag.vue.js +7 -0
  126. package/dist/components/Content/Models/ModelTag.vue.js.map +1 -0
  127. package/dist/components/Content/Models/ModelTag.vue.script.js +69 -0
  128. package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -0
  129. package/dist/components/Content/Models/components/ClassicLayout.vue.js +9 -0
  130. package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -0
  131. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +81 -0
  132. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -0
  133. package/dist/components/Content/Models/components/ModernLayout.vue.js +7 -0
  134. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -0
  135. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +66 -0
  136. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -0
  137. package/dist/components/Content/Models/index.d.ts +2 -2
  138. package/dist/components/Content/Operations/TraversedEntry.vue.js +7 -0
  139. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -0
  140. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +213 -0
  141. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -0
  142. package/dist/components/Content/Schema/RenderString.vue.js +7 -0
  143. package/dist/components/Content/Schema/RenderString.vue.js.map +1 -0
  144. package/dist/components/Content/Schema/RenderString.vue.script.js +36 -0
  145. package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -0
  146. package/dist/components/Content/Schema/Schema.vue.d.ts +4 -0
  147. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  148. package/dist/components/Content/Schema/Schema.vue.js +9 -0
  149. package/dist/components/Content/Schema/Schema.vue.js.map +1 -0
  150. package/dist/components/Content/Schema/Schema.vue.script.js +194 -0
  151. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -0
  152. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +5 -1
  153. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  154. package/dist/components/Content/Schema/SchemaComposition.vue.js +7 -0
  155. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -0
  156. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +176 -0
  157. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -0
  158. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +9 -0
  159. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -0
  160. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +29 -0
  161. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
  162. package/dist/components/Content/Schema/SchemaEnums.vue.js +9 -0
  163. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -0
  164. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +108 -0
  165. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -0
  166. package/dist/components/Content/Schema/SchemaHeading.vue.js +9 -0
  167. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -0
  168. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +45 -0
  169. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -0
  170. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
  171. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
  172. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +55 -0
  173. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
  174. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -0
  175. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  176. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +7 -0
  177. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -0
  178. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +181 -0
  179. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -0
  180. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
  181. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  182. package/dist/components/Content/Schema/SchemaProperty.vue.js +9 -0
  183. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -0
  184. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +273 -0
  185. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -0
  186. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +9 -0
  187. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -0
  188. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +35 -0
  189. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -0
  190. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +9 -0
  191. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js.map +1 -0
  192. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +30 -0
  193. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -0
  194. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +9 -0
  195. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -0
  196. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +67 -0
  197. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -0
  198. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +9 -0
  199. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -0
  200. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +251 -0
  201. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -0
  202. package/dist/components/Content/Schema/helpers/format-example.js +26 -0
  203. package/dist/components/Content/Schema/helpers/format-example.js.map +1 -0
  204. package/dist/components/Content/Schema/helpers/format-value.js +22 -0
  205. package/dist/components/Content/Schema/helpers/format-value.js.map +1 -0
  206. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
  207. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +32 -0
  208. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -0
  209. package/dist/components/Content/Schema/helpers/get-enum-values.js +22 -0
  210. package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -0
  211. package/dist/components/Content/Schema/helpers/get-property-description.js +36 -0
  212. package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -0
  213. package/dist/components/Content/Schema/helpers/get-ref-name.js +19 -0
  214. package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -0
  215. package/dist/components/Content/Schema/helpers/get-schema-type.js +49 -0
  216. package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -0
  217. package/dist/components/Content/Schema/helpers/has-complex-array-items.js +53 -0
  218. package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -0
  219. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +18 -0
  220. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -0
  221. package/dist/components/Content/Schema/helpers/is-type-object.js +18 -0
  222. package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -0
  223. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +175 -0
  224. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -0
  225. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +68 -0
  226. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -0
  227. package/dist/components/Content/Schema/helpers/schema-composition.js +11 -0
  228. package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -0
  229. package/dist/components/Content/Schema/helpers/schema-name.js +23 -0
  230. package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -0
  231. package/dist/components/Content/Schema/helpers/should-display-description.js +17 -0
  232. package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -0
  233. package/dist/components/Content/Schema/helpers/should-display-heading.js +18 -0
  234. package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -0
  235. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +20 -0
  236. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -0
  237. package/dist/components/Content/Schema/helpers/sort-property-names.js +45 -0
  238. package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -0
  239. package/dist/components/Content/Schema/index.d.ts +4 -4
  240. package/dist/components/Content/Tags/Tag.vue.js +7 -0
  241. package/dist/components/Content/Tags/Tag.vue.js.map +1 -0
  242. package/dist/components/Content/Tags/Tag.vue.script.js +56 -0
  243. package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -0
  244. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +9 -0
  245. package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -0
  246. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +49 -0
  247. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -0
  248. package/dist/components/Content/Tags/components/ModernLayout.vue.js +9 -0
  249. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -0
  250. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +63 -0
  251. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -0
  252. package/dist/components/Content/Tags/components/TagSection.vue.js +7 -0
  253. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -0
  254. package/dist/components/Content/Tags/components/TagSection.vue.script.js +78 -0
  255. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -0
  256. package/dist/components/Content/Tags/index.d.ts +1 -1
  257. package/dist/components/Content/index.d.ts +2 -2
  258. package/dist/components/GettingStarted.vue.js +9 -0
  259. package/dist/components/GettingStarted.vue.js.map +1 -0
  260. package/dist/components/GettingStarted.vue.script.js +71 -0
  261. package/dist/components/GettingStarted.vue.script.js.map +1 -0
  262. package/dist/components/HttpMethod/HttpMethod.vue.js +7 -0
  263. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
  264. package/dist/components/HttpMethod/HttpMethod.vue.script.js +33 -0
  265. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
  266. package/dist/components/HttpMethod/index.d.ts +1 -1
  267. package/dist/components/IntersectionObserver.vue.js +7 -0
  268. package/dist/components/IntersectionObserver.vue.js.map +1 -0
  269. package/dist/components/IntersectionObserver.vue.script.js +45 -0
  270. package/dist/components/IntersectionObserver.vue.script.js.map +1 -0
  271. package/dist/components/Lazy/Lazy.vue.js +7 -0
  272. package/dist/components/Lazy/Lazy.vue.js.map +1 -0
  273. package/dist/components/Lazy/Lazy.vue.script.js +101 -0
  274. package/dist/components/Lazy/Lazy.vue.script.js.map +1 -0
  275. package/dist/components/LinkList/LinkList.vue.js +9 -0
  276. package/dist/components/LinkList/LinkList.vue.js.map +1 -0
  277. package/dist/components/LinkList/LinkList.vue.script.js +53 -0
  278. package/dist/components/LinkList/LinkList.vue.script.js.map +1 -0
  279. package/dist/components/LinkList/index.d.ts +1 -1
  280. package/dist/components/LoadingSkeleton.vue.js +9 -0
  281. package/dist/components/LoadingSkeleton.vue.js.map +1 -0
  282. package/dist/components/LoadingSkeleton.vue.script.js +20 -0
  283. package/dist/components/LoadingSkeleton.vue.script.js.map +1 -0
  284. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  285. package/dist/components/MobileHeader.vue.js +7 -0
  286. package/dist/components/MobileHeader.vue.js.map +1 -0
  287. package/dist/components/MobileHeader.vue.script.js +43 -0
  288. package/dist/components/MobileHeader.vue.script.js.map +1 -0
  289. package/dist/components/OperationPath.vue.js +9 -0
  290. package/dist/components/OperationPath.vue.js.map +1 -0
  291. package/dist/components/OperationPath.vue.script.js +24 -0
  292. package/dist/components/OperationPath.vue.script.js.map +1 -0
  293. package/dist/components/OperationsList/OperationsList.vue.js +9 -0
  294. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -0
  295. package/dist/components/OperationsList/OperationsList.vue.script.js +49 -0
  296. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -0
  297. package/dist/components/OperationsList/OperationsListItem.vue.js +9 -0
  298. package/dist/components/OperationsList/OperationsListItem.vue.js.map +1 -0
  299. package/dist/components/OperationsList/OperationsListItem.vue.script.js +51 -0
  300. package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -0
  301. package/dist/components/OperationsList/index.d.ts +1 -1
  302. package/dist/components/RenderPlugins/RenderPlugins.vue.js +7 -0
  303. package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -0
  304. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +44 -0
  305. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -0
  306. package/dist/components/RenderPlugins/index.d.ts +1 -1
  307. package/dist/components/ScreenReader.vue.js +9 -0
  308. package/dist/components/ScreenReader.vue.js.map +1 -0
  309. package/dist/components/ScreenReader.vue.script.js +22 -0
  310. package/dist/components/ScreenReader.vue.script.js.map +1 -0
  311. package/dist/components/Section/CompactSection.vue.js +9 -0
  312. package/dist/components/Section/CompactSection.vue.js.map +1 -0
  313. package/dist/components/Section/CompactSection.vue.script.js +56 -0
  314. package/dist/components/Section/CompactSection.vue.script.js.map +1 -0
  315. package/dist/components/Section/Section.vue.js +9 -0
  316. package/dist/components/Section/Section.vue.js.map +1 -0
  317. package/dist/components/Section/Section.vue.script.js +23 -0
  318. package/dist/components/Section/Section.vue.script.js.map +1 -0
  319. package/dist/components/Section/SectionAccordion.vue.js +9 -0
  320. package/dist/components/Section/SectionAccordion.vue.js.map +1 -0
  321. package/dist/components/Section/SectionAccordion.vue.script.js +60 -0
  322. package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -0
  323. package/dist/components/Section/SectionColumn.vue.js +14 -0
  324. package/dist/components/Section/SectionColumn.vue.js.map +1 -0
  325. package/dist/components/Section/SectionColumns.vue.js +14 -0
  326. package/dist/components/Section/SectionColumns.vue.js.map +1 -0
  327. package/dist/components/Section/SectionContainer.vue.js +9 -0
  328. package/dist/components/Section/SectionContainer.vue.js.map +1 -0
  329. package/dist/components/Section/SectionContainer.vue.script.js +19 -0
  330. package/dist/components/Section/SectionContainer.vue.script.js.map +1 -0
  331. package/dist/components/Section/SectionContainerAccordion.vue.js +9 -0
  332. package/dist/components/Section/SectionContainerAccordion.vue.js.map +1 -0
  333. package/dist/components/Section/SectionContainerAccordion.vue.script.js +40 -0
  334. package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -0
  335. package/dist/components/Section/SectionContent.vue.js +9 -0
  336. package/dist/components/Section/SectionContent.vue.js.map +1 -0
  337. package/dist/components/Section/SectionContent.vue.script.js +23 -0
  338. package/dist/components/Section/SectionContent.vue.script.js.map +1 -0
  339. package/dist/components/Section/SectionHeader.vue.js +9 -0
  340. package/dist/components/Section/SectionHeader.vue.js.map +1 -0
  341. package/dist/components/Section/SectionHeader.vue.script.js +23 -0
  342. package/dist/components/Section/SectionHeader.vue.script.js.map +1 -0
  343. package/dist/components/Section/SectionHeaderTag.vue.js +9 -0
  344. package/dist/components/Section/SectionHeaderTag.vue.js.map +1 -0
  345. package/dist/components/Section/SectionHeaderTag.vue.script.js +18 -0
  346. package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -0
  347. package/dist/components/Section/index.d.ts +10 -10
  348. package/dist/components/SectionFlare/SectionFlare.vue.js +14 -0
  349. package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -0
  350. package/dist/components/SectionFlare/index.d.ts +1 -1
  351. package/dist/components/ShowMoreButton.vue.js +9 -0
  352. package/dist/components/ShowMoreButton.vue.js.map +1 -0
  353. package/dist/components/ShowMoreButton.vue.script.js +22 -0
  354. package/dist/components/ShowMoreButton.vue.script.js.map +1 -0
  355. package/dist/components/index.d.ts +5 -5
  356. package/dist/components/index.js +20 -102
  357. package/dist/features/Operation/Operation.vue.js +7 -0
  358. package/dist/features/Operation/Operation.vue.js.map +1 -0
  359. package/dist/features/Operation/Operation.vue.script.js +115 -0
  360. package/dist/features/Operation/Operation.vue.script.js.map +1 -0
  361. package/dist/features/Operation/components/ContentTypeSelect.vue.js +7 -0
  362. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -0
  363. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +75 -0
  364. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -0
  365. package/dist/features/Operation/components/Header.vue.js +7 -0
  366. package/dist/features/Operation/components/Header.vue.js.map +1 -0
  367. package/dist/features/Operation/components/Header.vue.script.js +42 -0
  368. package/dist/features/Operation/components/Header.vue.script.js.map +1 -0
  369. package/dist/features/Operation/components/Headers.vue.js +9 -0
  370. package/dist/features/Operation/components/Headers.vue.js.map +1 -0
  371. package/dist/features/Operation/components/Headers.vue.script.js +58 -0
  372. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -0
  373. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  374. package/dist/features/Operation/components/OperationParameters.vue.js +7 -0
  375. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -0
  376. package/dist/features/Operation/components/OperationParameters.vue.script.js +108 -0
  377. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -0
  378. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  379. package/dist/features/Operation/components/OperationResponses.vue.js +7 -0
  380. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -0
  381. package/dist/features/Operation/components/OperationResponses.vue.script.js +48 -0
  382. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -0
  383. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  384. package/dist/features/Operation/components/ParameterList.vue.js +7 -0
  385. package/dist/features/Operation/components/ParameterList.vue.js.map +1 -0
  386. package/dist/features/Operation/components/ParameterList.vue.script.js +53 -0
  387. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -0
  388. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  389. package/dist/features/Operation/components/ParameterListItem.vue.js +9 -0
  390. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -0
  391. package/dist/features/Operation/components/ParameterListItem.vue.script.js +161 -0
  392. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -0
  393. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  394. package/dist/features/Operation/components/RequestBody.vue.js +9 -0
  395. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -0
  396. package/dist/features/Operation/components/RequestBody.vue.script.js +160 -0
  397. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -0
  398. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  399. package/dist/features/Operation/components/callbacks/Callback.vue.js +9 -0
  400. package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -0
  401. package/dist/features/Operation/components/callbacks/Callback.vue.script.js +62 -0
  402. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -0
  403. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  404. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +7 -0
  405. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -0
  406. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +67 -0
  407. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -0
  408. package/dist/features/Operation/helpers/filter-selected-security.js +30 -0
  409. package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -0
  410. package/dist/features/Operation/helpers/get-first-server.js +27 -0
  411. package/dist/features/Operation/helpers/get-first-server.js.map +1 -0
  412. package/dist/features/Operation/index.d.ts +1 -1
  413. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  414. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  415. package/dist/features/Operation/layouts/ClassicLayout.vue.js +9 -0
  416. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -0
  417. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +254 -0
  418. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -0
  419. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
  420. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  421. package/dist/features/Operation/layouts/ModernLayout.vue.js +9 -0
  422. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -0
  423. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +254 -0
  424. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -0
  425. package/dist/features/Operation/request-body-composition-index.d.ts +8 -0
  426. package/dist/features/Operation/request-body-composition-index.d.ts.map +1 -0
  427. package/dist/features/Operation/request-body-composition-index.js +10 -0
  428. package/dist/features/Operation/request-body-composition-index.js.map +1 -0
  429. package/dist/features/Search/components/SearchButton.vue.js +7 -0
  430. package/dist/features/Search/components/SearchButton.vue.js.map +1 -0
  431. package/dist/features/Search/components/SearchButton.vue.script.js +77 -0
  432. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -0
  433. package/dist/features/Search/components/SearchModal.vue.js +9 -0
  434. package/dist/features/Search/components/SearchModal.vue.js.map +1 -0
  435. package/dist/features/Search/components/SearchModal.vue.script.js +115 -0
  436. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -0
  437. package/dist/features/Search/components/SearchResult.vue.js +7 -0
  438. package/dist/features/Search/components/SearchResult.vue.js.map +1 -0
  439. package/dist/features/Search/components/SearchResult.vue.script.js +69 -0
  440. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -0
  441. package/dist/features/Search/helpers/create-fuse-instance.js +52 -0
  442. package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -0
  443. package/dist/features/Search/helpers/create-search-index.js +127 -0
  444. package/dist/features/Search/helpers/create-search-index.js.map +1 -0
  445. package/dist/features/Search/hooks/useSearchIndex.js +31 -0
  446. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -0
  447. package/dist/features/Search/index.d.ts +2 -2
  448. package/dist/features/Search/types.d.ts +1 -1
  449. package/dist/features/ask-agent-button/AskAgentButton.vue.js +9 -0
  450. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -0
  451. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +49 -0
  452. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -0
  453. package/dist/features/developer-tools/DeveloperTools.vue.d.ts +2 -1
  454. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  455. package/dist/features/developer-tools/DeveloperTools.vue.js +7 -0
  456. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -0
  457. package/dist/features/developer-tools/DeveloperTools.vue.script.js +56 -0
  458. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -0
  459. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +13 -0
  460. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -0
  461. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +7 -0
  462. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -0
  463. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +38 -0
  464. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -0
  465. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +7 -0
  466. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -0
  467. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +112 -0
  468. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -0
  469. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +7 -0
  470. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -0
  471. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +60 -0
  472. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -0
  473. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +7 -0
  474. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -0
  475. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +35 -0
  476. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -0
  477. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts +2 -0
  478. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  479. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +7 -0
  480. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -0
  481. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +68 -0
  482. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -0
  483. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts +2 -0
  484. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  485. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +7 -0
  486. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -0
  487. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +86 -0
  488. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -0
  489. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts +2 -0
  490. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  491. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +7 -0
  492. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -0
  493. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +68 -0
  494. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -0
  495. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +7 -0
  496. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -0
  497. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +44 -0
  498. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -0
  499. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts +2 -0
  500. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  501. package/dist/features/developer-tools/components/DeployApiReference.vue.js +7 -0
  502. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -0
  503. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +32 -0
  504. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -0
  505. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +7 -0
  506. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -0
  507. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +86 -0
  508. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -0
  509. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts +2 -0
  510. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  511. package/dist/features/developer-tools/components/ShareApiReference.vue.js +7 -0
  512. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -0
  513. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +32 -0
  514. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -0
  515. package/dist/features/developer-tools/index.d.ts +1 -1
  516. package/dist/features/example-responses/ExampleResponse.vue.js +9 -0
  517. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -0
  518. package/dist/features/example-responses/ExampleResponse.vue.script.js +56 -0
  519. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -0
  520. package/dist/features/example-responses/ExampleResponseTab.vue.js +9 -0
  521. package/dist/features/example-responses/ExampleResponseTab.vue.js.map +1 -0
  522. package/dist/features/example-responses/ExampleResponseTab.vue.script.js +21 -0
  523. package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -0
  524. package/dist/features/example-responses/ExampleResponseTabList.vue.js +9 -0
  525. package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -0
  526. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +31 -0
  527. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -0
  528. package/dist/features/example-responses/ExampleResponses.vue.js +9 -0
  529. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -0
  530. package/dist/features/example-responses/ExampleResponses.vue.script.js +157 -0
  531. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -0
  532. package/dist/features/example-responses/ExampleSchema.vue.js +7 -0
  533. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -0
  534. package/dist/features/example-responses/ExampleSchema.vue.script.js +42 -0
  535. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -0
  536. package/dist/features/example-responses/has-response-content.js +37 -0
  537. package/dist/features/example-responses/has-response-content.js.map +1 -0
  538. package/dist/features/example-responses/index.d.ts +1 -1
  539. package/dist/features/external-docs/ExternalDocs.vue.js +7 -0
  540. package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -0
  541. package/dist/features/external-docs/ExternalDocs.vue.script.js +37 -0
  542. package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -0
  543. package/dist/features/external-docs/index.d.ts +1 -1
  544. package/dist/features/index.d.ts +2 -2
  545. package/dist/features/index.js +4 -3
  546. package/dist/features/info-object/Contact.vue.js +7 -0
  547. package/dist/features/info-object/Contact.vue.js.map +1 -0
  548. package/dist/features/info-object/Contact.vue.script.js +37 -0
  549. package/dist/features/info-object/Contact.vue.script.js.map +1 -0
  550. package/dist/features/info-object/License.vue.js +7 -0
  551. package/dist/features/info-object/License.vue.js.map +1 -0
  552. package/dist/features/info-object/License.vue.script.js +32 -0
  553. package/dist/features/info-object/License.vue.script.js.map +1 -0
  554. package/dist/features/info-object/TermsOfService.vue.js +7 -0
  555. package/dist/features/info-object/TermsOfService.vue.js.map +1 -0
  556. package/dist/features/info-object/TermsOfService.vue.script.js +29 -0
  557. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -0
  558. package/dist/features/info-object/index.d.ts +3 -3
  559. package/dist/features/multiple-documents/DocumentSelector.vue.js +7 -0
  560. package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -0
  561. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +48 -0
  562. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -0
  563. package/dist/features/specification-extension/SpecificationExtension.vue.js +7 -0
  564. package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -0
  565. package/dist/features/specification-extension/SpecificationExtension.vue.script.js +56 -0
  566. package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -0
  567. package/dist/features/specification-extension/helpers.js +15 -0
  568. package/dist/features/specification-extension/helpers.js.map +1 -0
  569. package/dist/features/specification-extension/index.d.ts +2 -2
  570. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +1 -0
  571. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  572. package/dist/features/test-request-button/TestRequestButton.vue.js +9 -0
  573. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -0
  574. package/dist/features/test-request-button/TestRequestButton.vue.script.js +49 -0
  575. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -0
  576. package/dist/features/test-request-button/index.d.ts +1 -1
  577. package/dist/features/x-badges/XBadges.vue.js +7 -0
  578. package/dist/features/x-badges/XBadges.vue.js.map +1 -0
  579. package/dist/features/x-badges/XBadges.vue.script.js +31 -0
  580. package/dist/features/x-badges/XBadges.vue.script.js.map +1 -0
  581. package/dist/features/x-badges/index.d.ts +1 -1
  582. package/dist/helpers/color-mode.js +15 -0
  583. package/dist/helpers/color-mode.js.map +1 -0
  584. package/dist/helpers/download.js +77 -0
  585. package/dist/helpers/download.js.map +1 -0
  586. package/dist/helpers/id-routing.js +107 -0
  587. package/dist/helpers/id-routing.js.map +1 -0
  588. package/dist/helpers/index.d.ts +8 -8
  589. package/dist/helpers/index.js +8 -2
  590. package/dist/{lazy-bus-CV8Ox5hD.js → helpers/lazy-bus.js} +3 -106
  591. package/dist/helpers/lazy-bus.js.map +1 -0
  592. package/dist/helpers/load-from-perssistance.js +23 -0
  593. package/dist/helpers/load-from-perssistance.js.map +1 -0
  594. package/dist/helpers/map-config-plugins.js +44 -0
  595. package/dist/helpers/map-config-plugins.js.map +1 -0
  596. package/dist/helpers/map-config-to-workspace-store.js +24 -0
  597. package/dist/helpers/map-config-to-workspace-store.js.map +1 -0
  598. package/dist/helpers/normalize-configurations.js +66 -0
  599. package/dist/helpers/normalize-configurations.js.map +1 -0
  600. package/dist/helpers/openapi.js +132 -0
  601. package/dist/helpers/openapi.js.map +1 -0
  602. package/dist/{storage--3JuzjCI.js → helpers/storage.js} +2 -2
  603. package/dist/helpers/storage.js.map +1 -0
  604. package/dist/helpers/upload-temp-document.d.ts +2 -1
  605. package/dist/helpers/upload-temp-document.d.ts.map +1 -1
  606. package/dist/helpers/upload-temp-document.js +24 -0
  607. package/dist/helpers/upload-temp-document.js.map +1 -0
  608. package/dist/hooks/index.d.ts +2 -2
  609. package/dist/hooks/index.js +2 -2
  610. package/dist/{use-agent-Bnm1de0n.js → hooks/use-agent.js} +2 -2
  611. package/dist/hooks/use-agent.js.map +1 -0
  612. package/dist/{use-intersection-8QqPi2O-.js → hooks/use-intersection.js} +2 -2
  613. package/dist/hooks/use-intersection.js.map +1 -0
  614. package/dist/index.d.ts +4 -4
  615. package/dist/index.js +6 -6
  616. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  617. package/dist/plugins/hooks/usePluginManager.js +16 -0
  618. package/dist/plugins/hooks/usePluginManager.js.map +1 -0
  619. package/dist/plugins/index.d.ts +3 -3
  620. package/dist/plugins/index.js +3 -1
  621. package/dist/plugins/persistance-plugin.js +39 -0
  622. package/dist/plugins/persistance-plugin.js.map +1 -0
  623. package/dist/plugins/plugin-manager.js +32 -0
  624. package/dist/plugins/plugin-manager.js.map +1 -0
  625. package/dist/ssr.js +6 -6
  626. package/dist/standalone/lib/html-api.js +73 -0
  627. package/dist/standalone/lib/html-api.js.map +1 -0
  628. package/dist/style.css +7171 -5725
  629. package/package.json +14 -14
  630. package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +0 -1
  631. package/dist/ExternalDocs-phu7GxpZ.js +0 -272
  632. package/dist/ExternalDocs-phu7GxpZ.js.map +0 -1
  633. package/dist/MobileHeader-DAm6yQX0.js +0 -1373
  634. package/dist/MobileHeader-DAm6yQX0.js.map +0 -1
  635. package/dist/Operation-CvpVIkc3.js +0 -3829
  636. package/dist/Operation-CvpVIkc3.js.map +0 -1
  637. package/dist/SearchButton-xzhIpMCZ.js +0 -621
  638. package/dist/SearchButton-xzhIpMCZ.js.map +0 -1
  639. package/dist/ServerSelector-5y29y2BJ.js +0 -852
  640. package/dist/ServerSelector-5y29y2BJ.js.map +0 -1
  641. package/dist/components/index.js.map +0 -1
  642. package/dist/consts/urls.d.ts +0 -13
  643. package/dist/consts/urls.d.ts.map +0 -1
  644. package/dist/lazy-bus-CV8Ox5hD.js.map +0 -1
  645. package/dist/normalize-configurations-DcVpOEjD.js +0 -232
  646. package/dist/normalize-configurations-DcVpOEjD.js.map +0 -1
  647. package/dist/plugins-4EyiUD_A.js +0 -80
  648. package/dist/plugins-4EyiUD_A.js.map +0 -1
  649. package/dist/src-DJwsRvMU.js +0 -1686
  650. package/dist/src-DJwsRvMU.js.map +0 -1
  651. package/dist/storage--3JuzjCI.js.map +0 -1
  652. package/dist/urls-gPTXGgbj.js +0 -17
  653. package/dist/urls-gPTXGgbj.js.map +0 -1
  654. package/dist/use-agent-Bnm1de0n.js.map +0 -1
  655. package/dist/use-intersection-8QqPi2O-.js.map +0 -1
@@ -1,3829 +0,0 @@
1
- import { r as useAgentContext } from "./use-agent-Bnm1de0n.js";
2
- import { a as SectionHeader_default, c as SectionColumn_default, d as _plugin_vue_export_helper_default, i as SectionHeaderTag_default, l as Section_default, n as LinkList_default, o as SectionContent_default, r as SpecificationExtension_default, s as SectionColumns_default, t as ExternalDocs_default, u as Badge_default } from "./ExternalDocs-phu7GxpZ.js";
3
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toRef, toValue, unref, useId, useModel, vModelCheckbox, vModelText, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
4
- import { Disclosure, DisclosureButton, DisclosurePanel, Tab, TabGroup, TabList } from "@headlessui/vue";
5
- import { ScalarButton, ScalarCard, ScalarCardFooter, ScalarCardHeader, ScalarCardSection, ScalarCodeBlock, ScalarErrorBoundary, ScalarIcon, ScalarIconButton, ScalarListbox, ScalarMarkdown, ScalarMarkdownSummary, ScalarVirtualText, ScalarWrappingText, cva, useBindCx } from "@scalar/components";
6
- import { useClipboard } from "@scalar/use-hooks/useClipboard";
7
- import { useElementHover } from "@vueuse/core";
8
- import { ScalarIconArrowUp, ScalarIconCaretDown, ScalarIconCaretRight, ScalarIconCopy, ScalarIconHash, ScalarIconLink, ScalarIconPlay, ScalarIconPlus, ScalarIconSparkle, ScalarIconWebhooksLogo } from "@scalar/icons";
9
- import { getObjectKeys, getOperationStability, getOperationStabilityColor, isOperationDeprecated, normalizeMimeTypeObject, shouldIgnoreEntity } from "@scalar/oas-utils/helpers";
10
- import { ExamplePicker, OperationCodeSample, getExampleFromSchema, getResolvedRefDeep } from "@scalar/api-client/v2/blocks/operation-code-sample";
11
- import { combineParams, getSelectedSecurity } from "@scalar/api-client/v2/features/operation";
12
- import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
13
- import { resolve } from "@scalar/workspace-store/resolve";
14
- import { isArraySchema, isNumberSchema, isSchema, isStringSchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
15
- import { isDefined } from "@scalar/helpers/array/is-defined";
16
- import { objectKeys } from "@scalar/helpers/object/object-keys";
17
- import { REGEX } from "@scalar/helpers/regex/regex-helpers";
18
- import { getHttpMethodInfo } from "@scalar/helpers/http/http-info";
19
- import { normalizeHttpMethod } from "@scalar/helpers/http/normalize-http-method";
20
- import { getExample, getSecuritySchemes } from "@scalar/api-client/v2/blocks/operation-block";
21
- import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
22
- import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
23
- import { objectEntries } from "@scalar/helpers/object/object-entries";
24
- //#region src/components/Section/SectionAccordion.vue?vue&type=script&setup=true&lang.ts
25
- var _hoisted_1$26 = { class: "section-accordion-button-content" };
26
- var _hoisted_2$20 = {
27
- key: 0,
28
- class: "section-accordion-button-actions"
29
- };
30
- var _hoisted_3$15 = {
31
- key: 0,
32
- class: "section-accordion-description"
33
- };
34
- var _hoisted_4$10 = { class: "section-accordion-content-card" };
35
- //#endregion
36
- //#region src/components/Section/SectionAccordion.vue
37
- var SectionAccordion_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
38
- __name: "SectionAccordion",
39
- props: {
40
- transparent: { type: Boolean },
41
- modelValue: { type: Boolean }
42
- },
43
- emits: ["update:modelValue"],
44
- setup(__props, { emit: __emit }) {
45
- const emit = __emit;
46
- const button = ref();
47
- const isHovered = useElementHover(button);
48
- return (_ctx, _cache) => {
49
- return openBlock(), createBlock(unref(Disclosure), {
50
- as: "section",
51
- class: normalizeClass(["section-accordion", { "section-accordion-transparent": __props.transparent }])
52
- }, {
53
- default: withCtx(() => [createVNode(unref(DisclosureButton), {
54
- ref_key: "button",
55
- ref: button,
56
- class: "section-accordion-button",
57
- onClick: _cache[0] || (_cache[0] = () => emit("update:modelValue", !__props.modelValue))
58
- }, {
59
- default: withCtx(() => [
60
- createElementVNode("div", _hoisted_1$26, [renderSlot(_ctx.$slots, "title", {}, void 0, true)]),
61
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_2$20, [renderSlot(_ctx.$slots, "actions", { active: unref(isHovered) || __props.modelValue }, void 0, true)])) : createCommentVNode("", true),
62
- createVNode(unref(ScalarIconCaretRight), { class: normalizeClass(["section-accordion-chevron size-4.5 transition-transform", { "rotate-90": __props.modelValue }]) }, null, 8, ["class"])
63
- ]),
64
- _: 3
65
- }, 512), __props.modelValue ? (openBlock(), createBlock(unref(DisclosurePanel), {
66
- key: 0,
67
- class: "section-accordion-content",
68
- static: ""
69
- }, {
70
- default: withCtx(() => [_ctx.$slots.description ? (openBlock(), createElementBlock("div", _hoisted_3$15, [renderSlot(_ctx.$slots, "description", {}, void 0, true)])) : createCommentVNode("", true), createElementVNode("div", _hoisted_4$10, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])]),
71
- _: 3
72
- })) : createCommentVNode("", true)]),
73
- _: 3
74
- }, 8, ["class"]);
75
- };
76
- }
77
- }), [["__scopeId", "data-v-ff689b94"]]);
78
- //#endregion
79
- //#region src/components/ScreenReader.vue?vue&type=script&setup=true&lang.ts
80
- var _hoisted_1$25 = {
81
- key: 0,
82
- class: "screenreader-only"
83
- };
84
- //#endregion
85
- //#region src/components/ScreenReader.vue
86
- var ScreenReader_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
87
- __name: "ScreenReader",
88
- props: { if: {
89
- type: Boolean,
90
- default: true
91
- } },
92
- setup(__props) {
93
- return (_ctx, _cache) => {
94
- return _ctx.$props.if ? (openBlock(), createElementBlock("span", _hoisted_1$25, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])) : renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true);
95
- };
96
- }
97
- }), [["__scopeId", "data-v-df2e1026"]]);
98
- //#endregion
99
- //#region src/components/Anchor/Anchor.vue?vue&type=script&setup=true&lang.ts
100
- var _hoisted_1$24 = ["id"];
101
- var _hoisted_2$19 = { class: "relative" };
102
- //#endregion
103
- //#region src/components/Anchor/Anchor.vue
104
- var Anchor_default = /* @__PURE__ */ defineComponent({
105
- __name: "Anchor",
106
- emits: ["copyAnchorUrl"],
107
- setup(__props, { emit: __emit }) {
108
- const emit = __emit;
109
- const labelId = useId();
110
- const { cx } = useBindCx();
111
- return (_ctx, _cache) => {
112
- return openBlock(), createElementBlock("span", normalizeProps(guardReactiveProps(unref(cx)("group/heading word-break-all relative"))), [createElementVNode("span", {
113
- id: unref(labelId),
114
- class: "contents"
115
- }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$24), createElementVNode("span", _hoisted_2$19, [_cache[2] || (_cache[2] = createElementVNode("span", null, "​", -1)), createVNode(unref(ScalarButton), {
116
- "aria-describedby": unref(labelId),
117
- class: "absolute top-1/2 left-0 inline-block h-fit -translate-y-1/2 px-1.5 py-1 opacity-0 group-hover/heading:opacity-100 group-has-focus-visible/heading:opacity-100",
118
- variant: "ghost",
119
- onClick: _cache[0] || (_cache[0] = withModifiers(() => emit("copyAnchorUrl"), ["stop"]))
120
- }, {
121
- default: withCtx(() => [createVNode(unref(ScalarIconHash), {
122
- "aria-hidden": "true",
123
- class: "size-4.5"
124
- }), createVNode(ScreenReader_default, null, {
125
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Copy link", -1)])]),
126
- _: 1
127
- })]),
128
- _: 1
129
- }, 8, ["aria-describedby"])])], 16);
130
- };
131
- }
132
- });
133
- //#endregion
134
- //#region src/components/Anchor/WithBreadcrumb.vue?vue&type=script&setup=true&lang.ts
135
- var _hoisted_1$23 = ["id"];
136
- var _hoisted_2$18 = { class: "sr-only" };
137
- //#endregion
138
- //#region src/components/Anchor/WithBreadcrumb.vue
139
- var WithBreadcrumb_default = /* @__PURE__ */ defineComponent({
140
- __name: "WithBreadcrumb",
141
- props: {
142
- breadcrumb: {},
143
- eventBus: {}
144
- },
145
- setup(__props) {
146
- return (_ctx, _cache) => {
147
- return __props.breadcrumb && __props.breadcrumb.length > 0 ? (openBlock(), createElementBlock("div", {
148
- key: 0,
149
- id: __props.breadcrumb.join("."),
150
- class: "relative scroll-mt-24"
151
- }, [renderSlot(_ctx.$slots, "default"), createElementVNode("button", {
152
- class: "text-c-3 hover:text-c-1 absolute -top-2 -left-4.5 flex h-[calc(100%+16px)] w-4.5 cursor-pointer items-center justify-center pr-1.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100",
153
- type: "button",
154
- onClick: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.breadcrumb.join(".") }))
155
- }, [createVNode(unref(ScalarIconLink), {
156
- class: "size-3",
157
- weight: "bold"
158
- }), createElementVNode("span", _hoisted_2$18, [renderSlot(_ctx.$slots, "sr-label", {}, () => [_cache[1] || (_cache[1] = createTextVNode("Copy link to ", -1)), renderSlot(_ctx.$slots, "default")])])])], 8, _hoisted_1$23)) : renderSlot(_ctx.$slots, "default", { key: 1 });
159
- };
160
- }
161
- });
162
- //#endregion
163
- //#region src/features/specification-extension/helpers.ts
164
- /**
165
- * Utility function to extract all keys starting with 'x-' (OpenAPI extensions) from an object.
166
- *
167
- * @param object - The object from which to extract extension keys.
168
- * @returns An object containing only the entries whose keys start with 'x-'.
169
- */
170
- var getXKeysFromObject = (object) => {
171
- if (!object) return {};
172
- return Object.fromEntries(Object.entries(object).filter(([key]) => key.startsWith("x-")));
173
- };
174
- //#endregion
175
- //#region src/components/Content/Schema/helpers/is-type-object.ts
176
- var isTypeObject = (schema) => {
177
- if (schema === null || typeof schema !== "object" || Array.isArray(schema)) return false;
178
- if ("oneOf" in schema || "anyOf" in schema || "allOf" in schema || "not" in schema) return false;
179
- const hasType = "type" in schema;
180
- if (hasType && Array.isArray(schema.type)) return schema.type.includes("object");
181
- const hasTypeObject = hasType && schema.type === "object";
182
- if (hasTypeObject) return true;
183
- if (hasType && !hasTypeObject) return false;
184
- const hasProperties = "properties" in schema;
185
- const hasAdditionalProperties = "additionalProperties" in schema;
186
- const hasPatternProperties = "patternProperties" in schema;
187
- return hasProperties || hasAdditionalProperties || hasPatternProperties;
188
- };
189
- //#endregion
190
- //#region src/components/Content/Schema/helpers/is-empty-schema-object.ts
191
- /**
192
- * Determines if the given schema is an empty object schema.
193
- * An empty object schema is defined as a schema with type 'object'
194
- * and no defined properties, no additionalProperties (or set to false), and no patternProperties.
195
- */
196
- var isEmptySchemaObject = (schema) => {
197
- if (!isTypeObject(schema)) return false;
198
- const hasNoProperties = Object.keys(schema.properties ?? {}).length === 0;
199
- const hasNoAdditionalProperties = schema.additionalProperties === void 0 || schema.additionalProperties === false;
200
- const hasNoPatternProperties = Object.keys(schema.patternProperties ?? {}).length === 0;
201
- return hasNoProperties && hasNoAdditionalProperties && hasNoPatternProperties;
202
- };
203
- //#endregion
204
- //#region src/components/Content/Schema/SchemaHeading.vue?vue&type=script&setup=true&lang.ts
205
- var _hoisted_1$22 = {
206
- key: 0,
207
- class: "schema-type"
208
- };
209
- var _hoisted_2$17 = ["title"];
210
- //#endregion
211
- //#region src/components/Content/Schema/SchemaHeading.vue
212
- var SchemaHeading_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
213
- __name: "SchemaHeading",
214
- props: {
215
- value: {},
216
- name: {}
217
- },
218
- setup(__props) {
219
- /** Generate a failsafe type from the properties when we don't have one */
220
- const failsafeType = computed(() => {
221
- if ("type" in __props.value) return __props.value.type;
222
- if (__props.value.enum) return "enum";
223
- if (isArraySchema(__props.value) && __props.value.items) return "array";
224
- if (isTypeObject(__props.value) && (__props.value.properties || __props.value.additionalProperties)) return "object";
225
- return "unknown";
226
- });
227
- return (_ctx, _cache) => {
228
- return typeof __props.value === "object" ? (openBlock(), createElementBlock("span", _hoisted_1$22, [createElementVNode("span", {
229
- class: "schema-type-icon",
230
- title: "type" in __props.value && typeof __props.value.type === "string" ? __props.value.type : "type" in __props.value && Array.isArray(__props.value.type) ? __props.value.type.join(" | ") : "unknown type"
231
- }, [
232
- unref(isTypeObject)(__props.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" {} ")], 64)) : createCommentVNode("", true),
233
- unref(isArraySchema)(__props.value) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" [] ")], 64)) : createCommentVNode("", true),
234
- __props.value.enum ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(" enum ")], 64)) : createCommentVNode("", true)
235
- ], 8, _hoisted_2$17), __props.name ? (openBlock(), createBlock(unref(ScalarWrappingText), {
236
- key: 0,
237
- text: __props.name,
238
- preset: "property"
239
- }, null, 8, ["text"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(failsafeType.value), 1)], 64))])) : createCommentVNode("", true);
240
- };
241
- }
242
- }), [["__scopeId", "data-v-70cb5c13"]]);
243
- //#endregion
244
- //#region src/components/Content/Schema/helpers/sort-property-names.ts
245
- /** Take a list of property names and reduce it back into an object */
246
- var reduceNamesToObject = (names, properties) => names.reduce((acc, name) => {
247
- const prop = properties?.[name];
248
- if (prop) acc[name] = prop;
249
- return acc;
250
- }, {});
251
- /** Sort property names in an object schema */
252
- var sortPropertyNames = (schema, discriminator, { hideReadOnly = false, hideWriteOnly = false, orderSchemaPropertiesBy = "alpha", orderRequiredPropertiesFirst = true } = {}) => {
253
- if (!isTypeObject(schema) || !schema.properties) return [];
254
- const propertyNames = Object.keys(schema.properties);
255
- const requiredPropertiesSet = new Set(schema.required || []);
256
- return propertyNames.sort((a, b) => {
257
- const aDiscriminator = a === discriminator?.propertyName;
258
- const bDiscriminator = b === discriminator?.propertyName;
259
- const aRequired = requiredPropertiesSet.has(a);
260
- const bRequired = requiredPropertiesSet.has(b);
261
- if (aDiscriminator && !bDiscriminator) return -1;
262
- if (!aDiscriminator && bDiscriminator) return 1;
263
- const aSchema = schema.properties?.[a];
264
- const bSchema = schema.properties?.[b];
265
- const aOrder = aSchema && typeof aSchema === "object" && "x-order" in aSchema ? aSchema["x-order"] : void 0;
266
- const bOrder = bSchema && typeof bSchema === "object" && "x-order" in bSchema ? bSchema["x-order"] : void 0;
267
- if (aOrder !== void 0 && bOrder !== void 0) return Number(aOrder) - Number(bOrder);
268
- if (aOrder !== void 0 && bOrder === void 0) return -1;
269
- if (aOrder === void 0 && bOrder !== void 0) return 1;
270
- if (orderRequiredPropertiesFirst) {
271
- if (aRequired && !bRequired) return -1;
272
- if (!aRequired && bRequired) return 1;
273
- }
274
- if (orderSchemaPropertiesBy === "alpha") return a.localeCompare(b);
275
- return 0;
276
- }).filter((property) => {
277
- const resolved = schema.properties && resolve.schema(schema.properties[property]);
278
- if (hideReadOnly && resolved?.readOnly === true) return false;
279
- if (hideWriteOnly && resolved?.writeOnly === true) return false;
280
- return true;
281
- });
282
- };
283
- //#endregion
284
- //#region src/components/Content/Schema/helpers/schema-composition.ts
285
- var compositions = [
286
- "oneOf",
287
- "anyOf",
288
- "allOf",
289
- "not"
290
- ];
291
- //#endregion
292
- //#region src/components/Content/Schema/helpers/has-complex-array-items.ts
293
- /** Composition keywords that indicate complex schema structure */
294
- var COMPOSITION_KEYWORDS = [
295
- "allOf",
296
- "oneOf",
297
- "anyOf"
298
- ];
299
- /**
300
- * Checks if a schema has object type (either explicit type: 'object' or has properties)
301
- */
302
- var isObjectType = (schema) => {
303
- if ("type" in schema && schema.type) {
304
- if (Array.isArray(schema.type)) return schema.type.includes("object");
305
- return schema.type === "object";
306
- }
307
- return "properties" in schema;
308
- };
309
- /**
310
- * Checks if a schema has complex features (refs, compositions, discriminators)
311
- */
312
- var hasComplexFeatures = (schema) => "$ref" in schema || "discriminator" in schema || COMPOSITION_KEYWORDS.some((keyword) => keyword in schema);
313
- /**
314
- * Checks if nested array items are complex
315
- */
316
- var hasComplexNestedArrayItems = (items) => {
317
- if (!isArraySchema(items) || typeof items.items !== "object") return false;
318
- if ("$ref" in items.items) return true;
319
- const nestedItems = getResolvedRef(items.items);
320
- if (!nestedItems) return false;
321
- return isObjectType(nestedItems) || hasComplexFeatures(nestedItems) || isArraySchema(nestedItems);
322
- };
323
- /**
324
- * Checks if array items have complex structure
325
- * like: objects, references, discriminators, compositions, or nested arrays with complex items
326
- *
327
- * @param value - The schema object to check
328
- * @returns true if the array has complex items, false otherwise
329
- */
330
- var hasComplexArrayItems = (value) => {
331
- if (!value || !isArraySchema(value) || typeof value.items !== "object") return false;
332
- if ("$ref" in value.items) return true;
333
- const items = getResolvedRef(value.items);
334
- if (!items) return false;
335
- if (hasComplexFeatures(items)) return true;
336
- if (isObjectType(items)) return true;
337
- return hasComplexNestedArrayItems(items);
338
- };
339
- //#endregion
340
- //#region src/components/Content/Schema/helpers/should-render-array-item-composition.ts
341
- /**
342
- * Check if array item composition should be rendered
343
- *
344
- * @param schema - The schema object to check
345
- * @param composition - The composition keyword to check for
346
- * @returns true if array item composition should be rendered, false otherwise
347
- */
348
- var shouldRenderArrayItemComposition = (schema, composition) => {
349
- if (!schema || !isArraySchema(schema)) return false;
350
- const items = schema.items;
351
- if (!items || typeof items !== "object" || !(composition in items)) return false;
352
- return !hasComplexArrayItems(schema);
353
- };
354
- //#endregion
355
- //#region src/components/Content/Schema/helpers/get-compositions-to-render.ts
356
- /**
357
- * Computes which compositions should be rendered and with which values
358
- *
359
- * @param value - The schema object to check for compositions
360
- * @returns Array of compositions to render with their values
361
- */
362
- var getCompositionsToRender = (value) => {
363
- if (!value) return [];
364
- return compositions.map((composition) => {
365
- if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) return {
366
- composition,
367
- value: resolve.schema(value.items)
368
- };
369
- if (value[composition]) {
370
- if (!(isArraySchema(value) && value.items && typeof value.items === "object" && composition in value.items)) return {
371
- composition,
372
- value: resolve.schema(value)
373
- };
374
- }
375
- return null;
376
- }).filter(isDefined);
377
- };
378
- //#endregion
379
- //#region src/components/Content/Schema/helpers/get-enum-values.ts
380
- /**
381
- * Extract enum values from schema or array items
382
- *
383
- * @param value - The schema object to extract enum values from
384
- * @returns Array of enum values, or empty array if no enum found
385
- */
386
- var getEnumValues = (value) => {
387
- if (!value) return [];
388
- if (value.enum) return value.enum;
389
- if (isArraySchema(value) && typeof value.items === "object") {
390
- const resolvedItems = resolve.schema(value.items);
391
- if (resolvedItems && "enum" in resolvedItems && resolvedItems.enum) return resolvedItems.enum;
392
- }
393
- return [];
394
- };
395
- //#endregion
396
- //#region src/components/Content/Schema/helpers/get-property-description.ts
397
- var TYPE_DESCRIPTIONS = {
398
- integer: {
399
- _default: "Integer numbers.",
400
- int32: "Signed 32-bit integers (commonly used integer type).",
401
- int64: "Signed 64-bit integers (long type)."
402
- },
403
- string: {
404
- "date": "full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21",
405
- "date-time": "the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z",
406
- "password": "a hint to UIs to mask the input",
407
- "base64": "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
408
- "byte": "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
409
- "binary": "binary data, used to describe files"
410
- }
411
- };
412
- /**
413
- * Generate property description from type/format
414
- *
415
- * @param value - The schema object to generate description from
416
- * @returns Description string or null if no description available
417
- */
418
- var getPropertyDescription = (value) => {
419
- if (!isSchema(value)) return null;
420
- /** Just grab the first type from the array if it's an array */
421
- const type = Array.isArray(value.type) ? value.type[0] : value.type;
422
- if (!type) return null;
423
- const typeDescriptions = TYPE_DESCRIPTIONS[type];
424
- if (!typeDescriptions) return null;
425
- return typeDescriptions["format" in value && value.format || "contentEncoding" in value && value.contentEncoding || "_default"] ?? null;
426
- };
427
- //#endregion
428
- //#region src/components/Content/Schema/helpers/optimize-value-for-display.ts
429
- /**
430
- * Optimize the value by removing nulls from compositions and merging root properties.
431
- *
432
- * TODO: figure out what this does
433
- */
434
- function optimizeValueForDisplay(value) {
435
- if (!value || typeof value !== "object") return value;
436
- const composition = compositions.find((keyword) => keyword in value && keyword !== "not");
437
- if (!composition) return { ...value };
438
- const schemas = value[composition];
439
- if (!Array.isArray(schemas)) return { ...value };
440
- const { [composition]: _, nullable: originalNullable, ...rootProperties } = value;
441
- const hasRootProperties = Object.keys(rootProperties).length > 0;
442
- const { filteredSchemas, hasNullSchema } = schemas.reduce((acc, _schema) => {
443
- const schema = resolve.schema(_schema);
444
- if ("type" in schema && schema.type === "null") acc.hasNullSchema = true;
445
- else acc.filteredSchemas.push(schema);
446
- return acc;
447
- }, {
448
- filteredSchemas: [],
449
- hasNullSchema: false
450
- });
451
- const shouldBeNullable = hasNullSchema || originalNullable === true;
452
- if (filteredSchemas.length === 1) {
453
- const mergedSchema = {
454
- ...rootProperties,
455
- ...filteredSchemas[0]
456
- };
457
- if (shouldBeNullable) mergedSchema.nullable = true;
458
- return mergedSchema;
459
- }
460
- if ((composition === "oneOf" || composition === "anyOf") && (hasRootProperties || filteredSchemas.some((schema) => schema.allOf))) {
461
- const mergedSchemas = filteredSchemas.map((_schema) => {
462
- const schema = resolve.schema(_schema);
463
- if (schema.allOf?.length === 1) {
464
- const { allOf, ...otherProps } = schema;
465
- return {
466
- ...rootProperties,
467
- ...otherProps,
468
- ...resolve.schema(allOf[0])
469
- };
470
- }
471
- return {
472
- ...rootProperties,
473
- ...schema
474
- };
475
- });
476
- const result = { [composition]: mergedSchemas };
477
- if (shouldBeNullable) result.nullable = true;
478
- return result;
479
- }
480
- if (filteredSchemas.length !== schemas.length) {
481
- const result = {
482
- ...value,
483
- [composition]: filteredSchemas
484
- };
485
- if (shouldBeNullable) result.nullable = true;
486
- return result;
487
- }
488
- return { ...value };
489
- }
490
- //#endregion
491
- //#region src/components/Content/Schema/helpers/should-display-description.ts
492
- /**
493
- * Determine if description should be displayed
494
- *
495
- * @param schema - The schema object to check
496
- * @param propDescription - Optional description from props
497
- * @returns Description string to display, or null if should not be displayed
498
- */
499
- var shouldDisplayDescription = (schema, propDescription) => {
500
- if (!schema) return null;
501
- if (schema.allOf) return null;
502
- return propDescription || schema.description || null;
503
- };
504
- //#endregion
505
- //#region src/components/Content/Schema/helpers/should-display-heading.ts
506
- /**
507
- * Determine if property heading should be displayed
508
- *
509
- * @param schema - The schema object to check
510
- * @param name - Optional property name
511
- * @param required - Whether the property is required
512
- * @returns true if heading should be displayed, false otherwise
513
- */
514
- var shouldDisplayHeading = (schema, name, required = false) => {
515
- if (name || required) return true;
516
- if (!schema) return false;
517
- return schema.deprecated === true || schema.const !== void 0 || schema.enum?.length === 1 || "type" in schema && schema.type !== void 0 || "nullable" in schema && schema.nullable === true || schema.writeOnly === true || schema.readOnly === true;
518
- };
519
- //#endregion
520
- //#region src/components/Content/Schema/helpers/get-schema-type.ts
521
- /**
522
- * Formats an array type string with proper wrapping for union types.
523
- */
524
- var formatArrayType = (itemType) => {
525
- if (!itemType) return "array";
526
- return `array ${itemType.includes(" | ") ? `(${itemType})` : itemType}[]`;
527
- };
528
- /**
529
- * Handles array type processing for both single array types and union types containing array.
530
- */
531
- var processArrayType = (value, isUnionType = false) => {
532
- if (!value.items) return "array";
533
- const baseType = formatArrayType(getSchemaType(resolve.schema(value.items)));
534
- if (isUnionType) return baseType;
535
- return value.nullable ? `${baseType} | null` : baseType;
536
- };
537
- /**
538
- * Computes the structural type for a schema.
539
- * This helper always returns type information, never schema titles or ref names.
540
- *
541
- * Priority order:
542
- * 1. const values
543
- * 2. Array types (with special handling for items)
544
- * 3. type with contentEncoding
545
- * 4. raw type
546
- */
547
- var getSchemaType = (valueOrRef) => {
548
- if (!valueOrRef) return "";
549
- const value = resolve.schema(valueOrRef);
550
- if (value.const !== void 0) return "const";
551
- if ("type" in value && Array.isArray(value.type)) {
552
- if (value.type.includes("array") && value.items) {
553
- const arrayType = processArrayType(value, true);
554
- const otherTypes = value.type.filter((t) => t !== "array");
555
- return otherTypes.length > 0 ? `${arrayType} | ${otherTypes.join(" | ")}` : arrayType;
556
- }
557
- return value.type.join(" | ");
558
- }
559
- if (isArraySchema(value)) return processArrayType(value, false);
560
- if ("type" in value && value.type && value.contentEncoding) return `${value.type} • ${value.contentEncoding}`;
561
- return "type" in value ? value.type : "";
562
- };
563
- //#endregion
564
- //#region src/components/Content/Schema/helpers/merge-all-of-schemas.ts
565
- /**
566
- * Merges multiple OpenAPI schema objects into a single schema object.
567
- * Handles nested allOf compositions and merges properties recursively.
568
- *
569
- * @param schemas - Array of OpenAPI schema objects to merge
570
- * @param rootSchema - Optional root schema to merge with the result
571
- * @returns Merged schema object
572
- */
573
- var mergeAllOfSchemas = (schemas, rootSchema) => {
574
- if (!schemas?.allOf?.length || !Array.isArray(schemas.allOf)) return rootSchema || {};
575
- const result = {};
576
- const { allOf: _, ...baseSchema } = schemas;
577
- for (const _schema of schemas.allOf) {
578
- if (!_schema || typeof _schema !== "object") continue;
579
- const schema = resolve.schema(_schema);
580
- if (schema.allOf) {
581
- mergeSchemaIntoResult(result, mergeAllOfSchemas(schema));
582
- continue;
583
- }
584
- mergeSchemaIntoResult(result, schema);
585
- }
586
- if (Object.keys(baseSchema).length > 0) mergeSchemaIntoResult(result, baseSchema, true);
587
- if (rootSchema && typeof rootSchema === "object") if (rootSchema.allOf) mergeSchemaIntoResult(result, mergeAllOfSchemas(rootSchema), true);
588
- else mergeSchemaIntoResult(result, rootSchema, true);
589
- return result;
590
- };
591
- /**
592
- * Efficiently merges a source schema into a target result object.
593
- * Handles all schema merging logic in a single optimized function.
594
- *
595
- * @param result - The target schema object to merge into
596
- * @param schema - The source schema object to merge from
597
- * @param override - Whether to override existing properties (default: false)
598
- */
599
- var mergeSchemaIntoResult = (result, schema, override = false) => {
600
- const schemaKeys = objectKeys(schema);
601
- if (schemaKeys.length === 0) return;
602
- for (const key of schemaKeys) {
603
- const value = getResolvedRef(schema[key]);
604
- if (value === void 0) continue;
605
- if (key === "required") {
606
- if (Array.isArray(value) && value.length > 0) if (result.required?.length) result.required = [...new Set([...result.required, ...value])];
607
- else result.required = value.slice();
608
- } else if (key === "properties") {
609
- if (value && typeof value === "object") {
610
- if (!result.properties) result.properties = {};
611
- mergePropertiesIntoResult(result.properties, value);
612
- }
613
- } else if (key === "items") {
614
- const items = resolve.schema(value);
615
- if (items) {
616
- if (isArraySchema(schema)) {
617
- if (!result.items) result.items = {};
618
- if (items.allOf) {
619
- const mergedItems = mergeAllOfSchemas(items);
620
- Object.assign(result.items, mergedItems);
621
- } else mergeItemsIntoResult(getResolvedRef(result.items), items);
622
- } else if (items.allOf) {
623
- const mergedItems = mergeAllOfSchemas(items);
624
- if ("properties" in mergedItems) {
625
- if (!("properties" in result)) result.properties = {};
626
- "properties" in result && mergePropertiesIntoResult(result.properties, mergedItems.properties);
627
- }
628
- } else if (!("items" in result)) result.items = items;
629
- }
630
- } else if (key === "enum") {
631
- if (Array.isArray(value) && value.length > 0) result.enum = [...new Set([...result.enum || [], ...value])];
632
- } else if (key === "oneOf" || key === "anyOf") {
633
- if (Array.isArray(value)) {
634
- if (!("properties" in result)) result.properties = {};
635
- for (const _option of value) {
636
- const option = resolve.schema(_option);
637
- if (option && "properties" in option && "properties" in result) mergePropertiesIntoResult(result.properties, option.properties);
638
- }
639
- }
640
- } else if (key === "allOf") continue;
641
- else if (override || result[key] === void 0) result[key] = value;
642
- }
643
- };
644
- /**
645
- * Efficiently merges properties into a result object without creating new objects.
646
- */
647
- var mergePropertiesIntoResult = (result, properties) => {
648
- const propertyKeys = Object.keys(properties ?? {});
649
- if (!properties || !result || propertyKeys.length === 0) return;
650
- for (const key of propertyKeys) {
651
- const schema = resolve.schema(properties[key]);
652
- if (!schema) {
653
- delete result[key];
654
- continue;
655
- }
656
- if (typeof schema !== "object") {
657
- result[key] = schema;
658
- continue;
659
- }
660
- if (!result[key]) {
661
- if (schema.allOf) result[key] = mergeAllOfSchemas(schema);
662
- else if (isArraySchema(schema) && resolve.schema(schema.items)?.allOf) result[key] = {
663
- ...schema,
664
- items: mergeAllOfSchemas(resolve.schema(schema.items))
665
- };
666
- else if (properties[key]) result[key] = properties[key];
667
- continue;
668
- }
669
- const existing = resolve.schema(result[key]);
670
- if (schema.allOf) result[key] = mergeAllOfSchemas({ allOf: [existing, ...schema.allOf] });
671
- else if (isArraySchema(schema) && isArraySchema(existing) && schema.items) {
672
- const existingItems = resolve.schema(existing.items);
673
- result[key] = {
674
- ...existing,
675
- type: "array",
676
- items: existingItems ? mergeItems(existingItems, resolve.schema(schema.items)) : resolve.schema(schema.items)
677
- };
678
- } else if ("properties" in existing && "properties" in schema) {
679
- const merged = {
680
- ...existing,
681
- ...schema
682
- };
683
- merged.properties = { ...existing.properties };
684
- mergePropertiesIntoResult(merged.properties, schema.properties);
685
- result[key] = merged;
686
- } else result[key] = {
687
- ...schema,
688
- ...existing
689
- };
690
- }
691
- };
692
- /**
693
- * Efficiently merges array items into a result object.
694
- */
695
- var mergeItemsIntoResult = (result, items) => {
696
- if (items.allOf || result.allOf) {
697
- const allOfSchemas = [];
698
- if (result.allOf) for (const schema of result.allOf) allOfSchemas.push(resolve.schema(schema));
699
- else allOfSchemas.push(result);
700
- if (items.allOf) for (const schema of items.allOf) allOfSchemas.push(resolve.schema(schema));
701
- else allOfSchemas.push(items);
702
- const merged = mergeAllOfSchemas({ allOf: allOfSchemas });
703
- Object.assign(result, merged);
704
- return;
705
- }
706
- Object.assign(result, items);
707
- if ("properties" in result && "properties" in items) mergePropertiesIntoResult(result.properties, items.properties);
708
- };
709
- /**
710
- * Helper function for merging items that returns a new object.
711
- */
712
- var mergeItems = (existing, incoming) => {
713
- if (existing.allOf || incoming.allOf) {
714
- const allOfSchemas = [];
715
- if (existing.allOf) for (const schema of existing.allOf) allOfSchemas.push(resolve.schema(schema));
716
- else allOfSchemas.push(existing);
717
- if (incoming.allOf) for (const schema of incoming.allOf) allOfSchemas.push(resolve.schema(schema));
718
- else allOfSchemas.push(incoming);
719
- return mergeAllOfSchemas({ allOf: allOfSchemas });
720
- }
721
- const merged = {
722
- ...existing,
723
- ...incoming
724
- };
725
- if ("properties" in existing && "properties" in incoming) {
726
- merged.properties = { ...existing.properties };
727
- mergePropertiesIntoResult(merged.properties, incoming.properties);
728
- }
729
- return merged;
730
- };
731
- //#endregion
732
- //#region src/components/Content/Schema/helpers/get-ref-name.ts
733
- /**
734
- * Gets the "name" of the schema from the ref path
735
- * TODO: this will change so fix it when the new refs are out
736
- * Then add tests
737
- *
738
- * @example SchemaName from #/components/schemas/SchemaName
739
- */
740
- var getRefName = (ref) => {
741
- if (!ref) return null;
742
- const match = ref.match(REGEX.REF_NAME);
743
- if (match) return match[1];
744
- return null;
745
- };
746
- //#endregion
747
- //#region src/components/Content/Schema/helpers/schema-name.ts
748
- /**
749
- * Extract schema name from various schema formats
750
- *
751
- * Handles $ref, title, name, type, and schema dictionary lookup
752
- */
753
- var getModelNameFromSchema = (schemaOrRef) => {
754
- if (!schemaOrRef) return null;
755
- const schema = resolve.schema(schemaOrRef);
756
- if (schema.title) return schema.title;
757
- if (schema.name) return schema.name;
758
- if ("$ref" in schemaOrRef) {
759
- const refName = getRefName(schemaOrRef.$ref);
760
- if (refName) return refName;
761
- }
762
- return null;
763
- };
764
- //#endregion
765
- //#region src/components/Content/Schema/SchemaComposition.vue?vue&type=script&setup=true&lang.ts
766
- var _hoisted_1$21 = { class: "property-rule" };
767
- var _hoisted_2$16 = {
768
- class: "composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border px-2.5 py-2.5 pr-3 text-left",
769
- type: "button"
770
- };
771
- var _hoisted_3$14 = { class: "text-c-2" };
772
- var _hoisted_4$9 = {
773
- key: 0,
774
- class: "text-red"
775
- };
776
- var _hoisted_5$8 = { class: "composition-panel" };
777
- //#endregion
778
- //#region src/components/Content/Schema/SchemaComposition.vue
779
- var SchemaComposition_default = /* @__PURE__ */ defineComponent({
780
- __name: "SchemaComposition",
781
- props: {
782
- composition: {},
783
- discriminator: {},
784
- name: {},
785
- schema: {},
786
- level: {},
787
- compact: {
788
- type: Boolean,
789
- default: false
790
- },
791
- hideHeading: {
792
- type: Boolean,
793
- default: false
794
- },
795
- breadcrumb: {},
796
- eventBus: {},
797
- options: {}
798
- },
799
- setup(__props) {
800
- const props = __props;
801
- /** The current composition */
802
- const composition = computed(() => [props.schema[props.composition]].flat().map((schema) => ({
803
- value: resolve.schema(schema),
804
- original: schema
805
- })).filter((it) => isDefined(it.value)));
806
- /**
807
- * Generate listbox options for the composition selector.
808
- * Each option represents a schema in the composition with a human-readable label.
809
- * Prefers schema title/name over structural type when present.
810
- */
811
- const listboxOptions = computed(() => composition.value.map((schema, index) => {
812
- const resolved = resolve.schema(schema.original);
813
- const label = (getModelNameFromSchema(resolved) ?? getSchemaType(resolved)) || "Schema";
814
- return {
815
- id: String(index),
816
- label
817
- };
818
- }));
819
- /**
820
- * Two-way computed property for the selected option.
821
- * Handles conversion between the selected index and the listbox option format.
822
- */
823
- const selectedOption = ref(listboxOptions.value[0]);
824
- /**
825
- * Humanize composition keyword name for display.
826
- * Converts camelCase to Title Case (e.g., oneOf -> One of).
827
- */
828
- const humanizeType = (type) => type.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).toLowerCase().replace(/^(\w)/, (c) => c.toUpperCase());
829
- /** Inside the currently selected composition */
830
- const selectedComposition = computed(() => composition.value[Number(selectedOption.value?.id ?? "0")]?.value);
831
- /** Controls whether the nested schema is displayed */
832
- const showNestedSchema = ref(false);
833
- return (_ctx, _cache) => {
834
- return openBlock(), createElementBlock("div", _hoisted_1$21, [props.composition === "allOf" ? (openBlock(), createBlock(Schema_default, {
835
- key: 0,
836
- breadcrumb: __props.breadcrumb,
837
- compact: __props.compact,
838
- discriminator: __props.discriminator,
839
- eventBus: __props.eventBus,
840
- hideHeading: __props.hideHeading,
841
- level: __props.level + 1,
842
- name: __props.name,
843
- noncollapsible: true,
844
- options: __props.options,
845
- schema: unref(mergeAllOfSchemas)(__props.schema)
846
- }, null, 8, [
847
- "breadcrumb",
848
- "compact",
849
- "discriminator",
850
- "eventBus",
851
- "hideHeading",
852
- "level",
853
- "name",
854
- "options",
855
- "schema"
856
- ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(ScalarListbox), {
857
- modelValue: selectedOption.value,
858
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedOption.value = $event),
859
- options: listboxOptions.value,
860
- resize: ""
861
- }, {
862
- default: withCtx(() => [createElementVNode("button", _hoisted_2$16, [
863
- createElementVNode("span", _hoisted_3$14, toDisplayString(humanizeType(props.composition)), 1),
864
- createElementVNode("span", { class: normalizeClass(["composition-selector-label text-c-1", { "line-through": selectedComposition.value?.deprecated }]) }, toDisplayString(selectedOption.value?.label || "Schema"), 3),
865
- selectedComposition.value?.deprecated ? (openBlock(), createElementBlock("div", _hoisted_4$9, " deprecated ")) : createCommentVNode("", true),
866
- createVNode(unref(ScalarIconCaretDown))
867
- ])]),
868
- _: 1
869
- }, 8, ["modelValue", "options"]), createElementVNode("div", _hoisted_5$8, [!showNestedSchema.value && __props.level > 2 ? (openBlock(), createElementBlock("button", {
870
- key: 0,
871
- class: "bg-b-1 hover:bg-b-2 text-c-1 flex w-full items-center justify-center gap-2 rounded-b-lg border border-t-0 px-2 py-2 text-sm font-medium transition-colors",
872
- type: "button",
873
- onClick: _cache[1] || (_cache[1] = ($event) => showNestedSchema.value = true)
874
- }, [_cache[2] || (_cache[2] = createTextVNode(" Show Schema Details ", -1)), createVNode(unref(ScalarIconCaretDown), { class: "h-3 w-3" })])) : (openBlock(), createBlock(Schema_default, {
875
- key: 1,
876
- breadcrumb: __props.breadcrumb,
877
- compact: __props.compact,
878
- discriminator: __props.discriminator,
879
- eventBus: __props.eventBus,
880
- hideHeading: __props.hideHeading,
881
- level: __props.level + 1,
882
- name: __props.name,
883
- noncollapsible: true,
884
- options: __props.options,
885
- schema: selectedComposition.value
886
- }, null, 8, [
887
- "breadcrumb",
888
- "compact",
889
- "discriminator",
890
- "eventBus",
891
- "hideHeading",
892
- "level",
893
- "name",
894
- "options",
895
- "schema"
896
- ]))])], 64))]);
897
- };
898
- }
899
- });
900
- //#endregion
901
- //#region src/components/Content/Schema/SchemaEnumPropertyItem.vue?vue&type=script&setup=true&lang.ts
902
- var _hoisted_1$20 = { class: "property-enum-value" };
903
- var _hoisted_2$15 = { class: "property-enum-value-content" };
904
- var _hoisted_3$13 = { class: "property-enum-value-label" };
905
- var _hoisted_4$8 = {
906
- key: 0,
907
- class: "property-enum-value-description"
908
- };
909
- //#endregion
910
- //#region src/components/Content/Schema/SchemaEnumPropertyItem.vue
911
- var SchemaEnumPropertyItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
912
- __name: "SchemaEnumPropertyItem",
913
- props: {
914
- label: {},
915
- description: {}
916
- },
917
- setup(__props) {
918
- return (_ctx, _cache) => {
919
- return openBlock(), createElementBlock("li", _hoisted_1$20, [createElementVNode("div", _hoisted_2$15, [createElementVNode("span", _hoisted_3$13, [createVNode(unref(ScalarWrappingText), {
920
- text: __props.label,
921
- preset: "property"
922
- }, null, 8, ["text"])]), __props.description ? (openBlock(), createElementBlock("span", _hoisted_4$8, [createVNode(unref(ScalarMarkdown), { value: __props.description }, null, 8, ["value"])])) : createCommentVNode("", true)])]);
923
- };
924
- }
925
- }), [["__scopeId", "data-v-f4b54bdd"]]);
926
- //#endregion
927
- //#region src/components/Content/Schema/SchemaEnums.vue?vue&type=script&setup=true&lang.ts
928
- var _hoisted_1$19 = {
929
- key: 0,
930
- class: "property-enum"
931
- };
932
- var _hoisted_2$14 = {
933
- key: 0,
934
- class: "property-enum-property-names"
935
- };
936
- var _hoisted_3$12 = {
937
- key: 1,
938
- class: "property-enum-property-names"
939
- };
940
- var _hoisted_4$7 = { class: "property-enum-values" };
941
- var _hoisted_5$7 = { key: 1 };
942
- var ENUM_DISPLAY_THRESHOLD = 9;
943
- var INITIAL_VISIBLE_COUNT = 5;
944
- var THIN_SPACE = " ";
945
- //#endregion
946
- //#region src/components/Content/Schema/SchemaEnums.vue
947
- var SchemaEnums_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
948
- __name: "SchemaEnums",
949
- props: {
950
- value: {},
951
- propertyNames: { type: Boolean }
952
- },
953
- setup(__props) {
954
- const enumValues = computed(() => {
955
- if (!__props.value) return [];
956
- return __props.value.enum || isArraySchema(__props.value) && resolve.schema(__props.value.items)?.enum || [];
957
- });
958
- /**
959
- * Determines if we should show the long enum list UI.
960
- * When there are many enum values, we initially show only a subset.
961
- */
962
- const shouldUseLongListDisplay = computed(() => enumValues.value.length > ENUM_DISPLAY_THRESHOLD);
963
- const initialVisibleCount = computed(() => shouldUseLongListDisplay.value ? INITIAL_VISIBLE_COUNT : enumValues.value.length);
964
- const visibleEnumValues = computed(() => enumValues.value.slice(0, initialVisibleCount.value));
965
- const hiddenEnumValues = computed(() => enumValues.value.slice(initialVisibleCount.value));
966
- /**
967
- * Gets the description for an enum value.
968
- * Supports both array and object formats for x-enumDescriptions.
969
- */
970
- const getEnumValueDescription = (enumValue, index) => {
971
- const descriptions = __props.value?.["x-enumDescriptions"] ?? __props.value?.["x-enum-descriptions"];
972
- if (!descriptions) return;
973
- if (Array.isArray(descriptions)) return descriptions[index];
974
- if (typeof descriptions === "object" && descriptions !== null) return descriptions[String(enumValue)];
975
- };
976
- /**
977
- * Formats an enum value with its variable name if available.
978
- * This supports both x-enum-varnames and x-enumNames extensions.
979
- */
980
- const formatEnumValueWithName = (enumValue, index) => {
981
- const varNames = __props.value?.["x-enum-varnames"] ?? __props.value?.["x-enumNames"];
982
- const varName = Array.isArray(varNames) ? varNames[index] : void 0;
983
- return varName ? `${enumValue}${THIN_SPACE}=${THIN_SPACE}${varName}` : String(enumValue);
984
- };
985
- /**
986
- * Controls whether the hidden enum values are visible.
987
- */
988
- const isExpanded = ref(false);
989
- const toggleExpanded = () => {
990
- isExpanded.value = !isExpanded.value;
991
- };
992
- return (_ctx, _cache) => {
993
- return enumValues.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$19, [__props.propertyNames ? (openBlock(), createElementBlock("div", _hoisted_2$14, " property names ")) : (openBlock(), createElementBlock("div", _hoisted_3$12, " values ")), createElementVNode("ul", _hoisted_4$7, [
994
- (openBlock(true), createElementBlock(Fragment, null, renderList(visibleEnumValues.value, (enumValue, index) => {
995
- return openBlock(), createBlock(SchemaEnumPropertyItem_default, {
996
- key: String(enumValue),
997
- description: getEnumValueDescription(enumValue, index),
998
- label: formatEnumValueWithName(enumValue, index)
999
- }, null, 8, ["description", "label"]);
1000
- }), 128)),
1001
- shouldUseLongListDisplay.value && isExpanded.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(hiddenEnumValues.value, (enumValue, index) => {
1002
- return openBlock(), createBlock(SchemaEnumPropertyItem_default, {
1003
- key: String(enumValue),
1004
- description: getEnumValueDescription(enumValue, initialVisibleCount.value + index),
1005
- label: formatEnumValueWithName(enumValue, initialVisibleCount.value + index)
1006
- }, null, 8, ["description", "label"]);
1007
- }), 128)) : createCommentVNode("", true),
1008
- shouldUseLongListDisplay.value ? (openBlock(), createElementBlock("li", _hoisted_5$7, [createVNode(unref(ScalarButton), {
1009
- class: "enum-toggle-button my-2 flex h-fit gap-1 rounded-full border py-1.5 pr-2.5 pl-2 leading-none",
1010
- variant: "ghost",
1011
- onClick: toggleExpanded
1012
- }, {
1013
- default: withCtx(() => [createVNode(unref(ScalarIconPlus), {
1014
- class: normalizeClass({ "rotate-45": isExpanded.value }),
1015
- weight: "bold"
1016
- }, null, 8, ["class"]), createTextVNode(" " + toDisplayString(isExpanded.value ? "Hide values" : "Show all values"), 1)]),
1017
- _: 1
1018
- })])) : createCommentVNode("", true)
1019
- ])])) : createCommentVNode("", true);
1020
- };
1021
- }
1022
- }), [["__scopeId", "data-v-55c01b89"]]);
1023
- //#endregion
1024
- //#region src/components/Content/Schema/RenderString.vue
1025
- var RenderString_default = /* @__PURE__ */ defineComponent({
1026
- __name: "RenderString",
1027
- props: { value: {} },
1028
- setup(__props) {
1029
- /**
1030
- * Give this component any data, and it tries to render a meaningful string.
1031
- *
1032
- * @example
1033
- * <RenderString :value="1" /> => "1"
1034
- * <RenderString :value="true" /> => "true"
1035
- * <RenderString :value="false" /> => "false"
1036
- * <RenderString :value="null" /> => "null"
1037
- * <RenderString :value="undefined" /> => "undefined"
1038
- * <RenderString :value="{}" /> => "{}"
1039
- * <RenderString :value="[]" /> => "[]"
1040
- * <RenderString :value="['a', 'b', 'c']" /> => "['a', 'b', 'c']"
1041
- * <RenderString :value="() => 'hello'" /> => "() => 'hello'"
1042
- * <RenderString :value="Symbol('test')" /> => "Symbol(test)"
1043
- **/
1044
- const valueAsString = computed(() => {
1045
- if (__props.value === "") return `''`;
1046
- if (__props.value === null) return "null";
1047
- if (__props.value === void 0) return "undefined";
1048
- return __props.value;
1049
- });
1050
- return (_ctx, _cache) => {
1051
- return toDisplayString(valueAsString.value);
1052
- };
1053
- }
1054
- });
1055
- //#endregion
1056
- //#region src/components/Content/Schema/helpers/format-value.ts
1057
- /**
1058
- * Converts a value to a string that can be displayed in the UI.
1059
- */
1060
- function formatValue(value) {
1061
- if (Array.isArray(value)) return `[${value.map((item) => {
1062
- if (typeof item === "string") return `"${item.toString().trim()}"`;
1063
- if (typeof item === "object") return JSON.stringify(item);
1064
- if (item === void 0) return "undefined";
1065
- if (item === null) return "null";
1066
- return item;
1067
- }).join(", ")}]`;
1068
- if (value === null) return "null";
1069
- if (typeof value === "object") return JSON.stringify(value);
1070
- if (value === void 0) return "undefined";
1071
- if (typeof value === "string") return value.trim();
1072
- return value.toString().trim();
1073
- }
1074
- //#endregion
1075
- //#region src/components/Content/Schema/SchemaPropertyDefault.vue?vue&type=script&setup=true&lang.ts
1076
- var _hoisted_1$18 = {
1077
- key: 0,
1078
- class: "property-default"
1079
- };
1080
- var _hoisted_2$13 = { class: "property-default-value-list" };
1081
- //#endregion
1082
- //#region src/components/Content/Schema/SchemaPropertyDefault.vue
1083
- var SchemaPropertyDefault_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1084
- __name: "SchemaPropertyDefault",
1085
- props: { value: {} },
1086
- setup(__props) {
1087
- const { copyToClipboard } = useClipboard();
1088
- return (_ctx, _cache) => {
1089
- return __props.value !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1$18, [_cache[1] || (_cache[1] = createElementVNode("button", {
1090
- class: "property-default-label",
1091
- type: "button"
1092
- }, [createElementVNode("span", null, "Default")], -1)), createElementVNode("div", _hoisted_2$13, [createElementVNode("button", {
1093
- class: "property-default-value group",
1094
- type: "button",
1095
- onClick: _cache[0] || (_cache[0] = ($event) => unref(copyToClipboard)(unref(formatValue)(__props.value)))
1096
- }, [createElementVNode("span", null, toDisplayString(unref(formatValue)(__props.value)), 1), createVNode(unref(ScalarIcon), {
1097
- class: "group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3",
1098
- icon: "Clipboard",
1099
- size: "xs"
1100
- })])])])) : createCommentVNode("", true);
1101
- };
1102
- }
1103
- }), [["__scopeId", "data-v-4da5c70a"]]);
1104
- //#endregion
1105
- //#region src/components/Content/Schema/SchemaPropertyDetail.vue?vue&type=script&setup=true&lang.ts
1106
- var _hoisted_1$17 = {
1107
- key: 0,
1108
- class: "property-detail-prefix"
1109
- };
1110
- var _hoisted_2$12 = {
1111
- key: 1,
1112
- class: "property-detail-value"
1113
- };
1114
- var _hoisted_3$11 = {
1115
- key: 2,
1116
- class: "property-detail-value"
1117
- };
1118
- //#endregion
1119
- //#region src/components/Content/Schema/SchemaPropertyDetail.vue
1120
- var SchemaPropertyDetail_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1121
- __name: "SchemaPropertyDetail",
1122
- props: {
1123
- truncate: { type: Boolean },
1124
- code: { type: Boolean }
1125
- },
1126
- setup(__props) {
1127
- return (_ctx, _cache) => {
1128
- return openBlock(), createElementBlock("span", { class: normalizeClass(["property-detail", { "property-detail-truncate": __props.truncate }]) }, [_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_1$17, [renderSlot(_ctx.$slots, "prefix", {}, void 0, true), _cache[0] || (_cache[0] = createTextVNode("\xA0 ", -1))])) : createCommentVNode("", true), __props.code ? (openBlock(), createElementBlock("code", _hoisted_2$12, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])) : (openBlock(), createElementBlock("span", _hoisted_3$11, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]))], 2);
1129
- };
1130
- }
1131
- }), [["__scopeId", "data-v-1295f965"]]);
1132
- //#endregion
1133
- //#region src/components/Content/Schema/helpers/format-example.ts
1134
- /**
1135
- * Converts an example value to a string that can be displayed in the UI.
1136
- */
1137
- function formatExample(example) {
1138
- if (Array.isArray(example)) return `[${example.map((item) => {
1139
- if (typeof item === "string") return `"${item.toString().trim()}"`;
1140
- if (typeof item === "object") return JSON.stringify(item);
1141
- if (item === void 0) return "undefined";
1142
- if (item === null) return "null";
1143
- return item;
1144
- }).join(", ")}]`;
1145
- if (example === null) return "null";
1146
- if (typeof example === "object") {
1147
- if ("value" in example) return example.value;
1148
- if ("externalValue" in example) return example.externalValue;
1149
- return JSON.stringify(example);
1150
- }
1151
- if (example === void 0) return "undefined";
1152
- if (typeof example === "string") return example.trim();
1153
- return example.toString().trim();
1154
- }
1155
- //#endregion
1156
- //#region src/components/Content/Schema/SchemaPropertyExamples.vue?vue&type=script&setup=true&lang.ts
1157
- var _hoisted_1$16 = {
1158
- key: 0,
1159
- class: "property-example"
1160
- };
1161
- var _hoisted_2$11 = { class: "property-example-value-list" };
1162
- var _hoisted_3$10 = {
1163
- key: 1,
1164
- class: "property-example"
1165
- };
1166
- var _hoisted_4$6 = {
1167
- class: "property-example-label",
1168
- type: "button"
1169
- };
1170
- var _hoisted_5$6 = { class: "property-example-value-list" };
1171
- var _hoisted_6$4 = ["onClick"];
1172
- //#endregion
1173
- //#region src/components/Content/Schema/SchemaPropertyExamples.vue
1174
- var SchemaPropertyExamples_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1175
- __name: "SchemaPropertyExamples",
1176
- props: {
1177
- examples: {},
1178
- example: {}
1179
- },
1180
- setup(__props) {
1181
- const { copyToClipboard } = useClipboard();
1182
- const hasSingleExample = computed(() => isDefined(__props.example));
1183
- const normalizedExamples = computed(() => {
1184
- if (__props.examples && typeof __props.examples === "object") return __props.examples;
1185
- return {};
1186
- });
1187
- const hasMultipleExamples = computed(() => Object.keys(normalizedExamples.value).length > 0);
1188
- const multipleExamplesLabel = computed(() => Object.keys(normalizedExamples.value).length === 1 ? "Example" : "Examples");
1189
- return (_ctx, _cache) => {
1190
- return openBlock(), createElementBlock(Fragment, null, [hasSingleExample.value ? (openBlock(), createElementBlock("div", _hoisted_1$16, [_cache[1] || (_cache[1] = createElementVNode("button", {
1191
- class: "property-example-label",
1192
- type: "button"
1193
- }, [createElementVNode("span", null, "Example")], -1)), createElementVNode("div", _hoisted_2$11, [createElementVNode("button", {
1194
- class: "property-example-value group",
1195
- type: "button",
1196
- onClick: _cache[0] || (_cache[0] = ($event) => unref(copyToClipboard)(unref(formatExample)(__props.example)))
1197
- }, [createElementVNode("span", null, toDisplayString(unref(formatExample)(__props.example)), 1), createVNode(unref(ScalarIcon), {
1198
- class: "group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3",
1199
- icon: "Clipboard",
1200
- size: "xs"
1201
- })])])])) : createCommentVNode("", true), hasMultipleExamples.value ? (openBlock(), createElementBlock("div", _hoisted_3$10, [createElementVNode("button", _hoisted_4$6, [createElementVNode("span", null, toDisplayString(multipleExamplesLabel.value), 1)]), createElementVNode("div", _hoisted_5$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedExamples.value, (ex, key) => {
1202
- return openBlock(), createElementBlock("button", {
1203
- key,
1204
- class: "property-example-value group",
1205
- type: "button",
1206
- onClick: ($event) => unref(copyToClipboard)(unref(formatExample)(ex))
1207
- }, [createElementVNode("span", null, toDisplayString(unref(formatExample)(ex)), 1), createVNode(unref(ScalarIcon), {
1208
- class: "text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3",
1209
- icon: "Clipboard",
1210
- size: "xs"
1211
- })], 8, _hoisted_6$4);
1212
- }), 128))])])) : createCommentVNode("", true)], 64);
1213
- };
1214
- }
1215
- }), [["__scopeId", "data-v-9a5f10a7"]]);
1216
- //#endregion
1217
- //#region src/components/Content/Schema/SchemaPropertyHeading.vue?vue&type=script&setup=true&lang.ts
1218
- var _hoisted_1$15 = { class: "property-heading" };
1219
- var _hoisted_2$10 = {
1220
- key: 1,
1221
- class: "property-discriminator"
1222
- };
1223
- var _hoisted_3$9 = {
1224
- key: 3,
1225
- class: "property-additional"
1226
- };
1227
- var _hoisted_4$5 = {
1228
- key: 4,
1229
- class: "property-deprecated"
1230
- };
1231
- var _hoisted_5$5 = {
1232
- key: 5,
1233
- class: "property-const"
1234
- };
1235
- var _hoisted_6$3 = {
1236
- key: 7,
1237
- class: "property-write-only"
1238
- };
1239
- var _hoisted_7$2 = {
1240
- key: 8,
1241
- class: "property-read-only"
1242
- };
1243
- var _hoisted_8$2 = {
1244
- key: 9,
1245
- class: "property-required"
1246
- };
1247
- //#endregion
1248
- //#region src/components/Content/Schema/SchemaPropertyHeading.vue
1249
- var SchemaPropertyHeading_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1250
- __name: "SchemaPropertyHeading",
1251
- props: {
1252
- value: {},
1253
- enum: { type: Boolean },
1254
- isDiscriminator: {
1255
- type: Boolean,
1256
- default: false
1257
- },
1258
- required: {
1259
- type: Boolean,
1260
- default: false
1261
- },
1262
- additional: { type: Boolean },
1263
- withExamples: {
1264
- type: Boolean,
1265
- default: true
1266
- },
1267
- hideModelNames: {
1268
- type: Boolean,
1269
- default: false
1270
- },
1271
- modelName: {}
1272
- },
1273
- setup(__props) {
1274
- const props = __props;
1275
- const valueRef = toRef(props, "value");
1276
- const constValue = computed(() => {
1277
- if (!valueRef.value) return;
1278
- const schema = valueRef.value;
1279
- if (schema.const !== void 0) return schema.const;
1280
- if (schema.enum?.length === 1) return schema.enum[0];
1281
- if (isArraySchema(schema) && schema.items) {
1282
- const items = resolve.schema(schema.items);
1283
- if (isDefined(items.const)) return items.const;
1284
- if (items.enum?.length === 1) return items.enum[0];
1285
- }
1286
- });
1287
- const validationProperties = computed(() => {
1288
- if (!valueRef.value) return [];
1289
- const schema = valueRef.value;
1290
- const properties = [];
1291
- if (isArraySchema(schema)) {
1292
- if (schema.minItems || schema.maxItems) properties.push({
1293
- key: "array-range",
1294
- value: `${schema.minItems || ""}…${schema.maxItems || ""}`
1295
- });
1296
- if (schema.uniqueItems) properties.push({
1297
- key: "unique-items",
1298
- value: "unique!"
1299
- });
1300
- }
1301
- if (isStringSchema(schema)) {
1302
- if (schema.minLength) properties.push({
1303
- key: "min-length",
1304
- prefix: "min length: ",
1305
- value: schema.minLength
1306
- });
1307
- if (schema.maxLength) properties.push({
1308
- key: "max-length",
1309
- prefix: "max length: ",
1310
- value: schema.maxLength
1311
- });
1312
- if (schema.pattern) properties.push({
1313
- key: "pattern",
1314
- value: schema.pattern,
1315
- code: true,
1316
- truncate: true
1317
- });
1318
- }
1319
- if (isStringSchema(schema) || isNumberSchema(schema)) {
1320
- if (schema.format) properties.push({
1321
- key: "format",
1322
- value: schema.format,
1323
- truncate: true
1324
- });
1325
- }
1326
- if (isNumberSchema(schema)) {
1327
- if (isDefined(schema.exclusiveMinimum)) properties.push({
1328
- key: "exclusive-minimum",
1329
- prefix: "greater than: ",
1330
- value: schema.exclusiveMinimum
1331
- });
1332
- if (isDefined(schema.minimum)) properties.push({
1333
- key: "minimum",
1334
- prefix: "min: ",
1335
- value: schema.minimum
1336
- });
1337
- if (isDefined(schema.exclusiveMaximum)) properties.push({
1338
- key: "exclusive-maximum",
1339
- prefix: "less than: ",
1340
- value: schema.exclusiveMaximum
1341
- });
1342
- if (isDefined(schema.maximum)) properties.push({
1343
- key: "maximum",
1344
- prefix: "max: ",
1345
- value: schema.maximum
1346
- });
1347
- if (isDefined(schema.multipleOf)) properties.push({
1348
- key: "multiple-of",
1349
- prefix: "multiple of: ",
1350
- value: schema.multipleOf
1351
- });
1352
- }
1353
- return properties;
1354
- });
1355
- /** Optional schema title/name shown in addition to structural type. */
1356
- const displayTitle = computed(() => {
1357
- if (!props.value) return null;
1358
- if (props.hideModelNames) return null;
1359
- if (props.modelName) return props.modelName;
1360
- const modelName = getModelNameFromSchema(props.value);
1361
- if (modelName) return modelName;
1362
- if (isArraySchema(props.value) && props.value.items) {
1363
- const itemName = getModelNameFromSchema(props.value.items);
1364
- return itemName ? `${itemName}[]` : null;
1365
- }
1366
- return null;
1367
- });
1368
- /** Check if we should show the type information */
1369
- const shouldShowType = computed(() => {
1370
- if (!props.value || !("type" in props.value)) return false;
1371
- if (props.value.type === "array") return true;
1372
- return !constValue.value;
1373
- });
1374
- /** Get the display type */
1375
- const displayType = computed(() => {
1376
- if (!props.value) return "";
1377
- return getSchemaType(props.value);
1378
- });
1379
- const exampleValue = computed(() => {
1380
- if (isDefined(props.value?.example)) return props.value.example;
1381
- if (props.value && isArraySchema(props.value)) {
1382
- const itemsExample = resolve.schema(props.value.items)?.example;
1383
- return isDefined(itemsExample) ? itemsExample : void 0;
1384
- }
1385
- });
1386
- return (_ctx, _cache) => {
1387
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
1388
- _ctx.$slots.name ? (openBlock(), createElementBlock("div", {
1389
- key: 0,
1390
- class: normalizeClass(["property-name", { deprecated: props.value?.deprecated }])
1391
- }, [renderSlot(_ctx.$slots, "name", {}, void 0, true)], 2)) : createCommentVNode("", true),
1392
- props.isDiscriminator ? (openBlock(), createElementBlock("div", _hoisted_2$10, " Discriminator ")) : createCommentVNode("", true),
1393
- props.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1394
- shouldShowType.value ? (openBlock(), createBlock(SchemaPropertyDetail_default, {
1395
- key: 0,
1396
- truncate: ""
1397
- }, {
1398
- default: withCtx(() => [createVNode(ScreenReader_default, null, {
1399
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Type: ", -1)])]),
1400
- _: 1
1401
- }), createTextVNode(toDisplayString(displayType.value) + toDisplayString(displayTitle.value ? ` · ${displayTitle.value}` : ""), 1)]),
1402
- _: 1
1403
- })) : createCommentVNode("", true),
1404
- (openBlock(true), createElementBlock(Fragment, null, renderList(validationProperties.value, (property) => {
1405
- return openBlock(), createBlock(SchemaPropertyDetail_default, {
1406
- key: property.key,
1407
- code: property.code,
1408
- truncate: property.truncate
1409
- }, createSlots({
1410
- default: withCtx(() => [property.key === "format" ? (openBlock(), createBlock(ScreenReader_default, { key: 0 }, {
1411
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Format:", -1)])]),
1412
- _: 1
1413
- })) : property.key === "pattern" ? (openBlock(), createBlock(ScreenReader_default, { key: 1 }, {
1414
- default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Pattern: ", -1)])]),
1415
- _: 1
1416
- })) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(property.value), 1)]),
1417
- _: 2
1418
- }, [property.prefix ? {
1419
- name: "prefix",
1420
- fn: withCtx(() => [createTextVNode(toDisplayString(property.prefix), 1)]),
1421
- key: "0"
1422
- } : void 0]), 1032, ["code", "truncate"]);
1423
- }), 128)),
1424
- props.enum ? (openBlock(), createBlock(SchemaPropertyDetail_default, { key: 1 }, {
1425
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("enum", -1)])]),
1426
- _: 1
1427
- })) : createCommentVNode("", true)
1428
- ], 64)) : createCommentVNode("", true),
1429
- props.additional ? (openBlock(), createElementBlock("div", _hoisted_3$9, [props.value?.["x-additionalPropertiesName"] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(props.value["x-additionalPropertiesName"]), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("additional properties")], 64))])) : createCommentVNode("", true),
1430
- props.value?.deprecated ? (openBlock(), createElementBlock("div", _hoisted_4$5, [createVNode(unref(Badge_default), null, {
1431
- default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("deprecated", -1)])]),
1432
- _: 1
1433
- })])) : createCommentVNode("", true),
1434
- constValue.value !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_5$5, [createVNode(SchemaPropertyDetail_default, { truncate: "" }, {
1435
- prefix: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("const: ", -1)])]),
1436
- default: withCtx(() => [createVNode(RenderString_default, { value: constValue.value }, null, 8, ["value"])]),
1437
- _: 1
1438
- })])) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [props.value?.nullable === true ? (openBlock(), createBlock(SchemaPropertyDetail_default, { key: 0 }, {
1439
- default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" nullable ", -1)])]),
1440
- _: 1
1441
- })) : createCommentVNode("", true)], 64)),
1442
- props.value?.writeOnly ? (openBlock(), createElementBlock("div", _hoisted_6$3, " write-only ")) : props.value?.readOnly ? (openBlock(), createElementBlock("div", _hoisted_7$2, " read-only ")) : createCommentVNode("", true),
1443
- props.required ? (openBlock(), createElementBlock("div", _hoisted_8$2, " required ")) : createCommentVNode("", true),
1444
- createVNode(SchemaPropertyDefault_default, { value: props.value?.default }, null, 8, ["value"]),
1445
- props.withExamples ? (openBlock(), createBlock(SchemaPropertyExamples_default, {
1446
- key: 10,
1447
- example: exampleValue.value,
1448
- examples: props.value?.examples
1449
- }, null, 8, ["example", "examples"])) : createCommentVNode("", true)
1450
- ]);
1451
- };
1452
- }
1453
- }), [["__scopeId", "data-v-d6007af3"]]);
1454
- //#endregion
1455
- //#region src/components/Content/Schema/SchemaProperty.vue?vue&type=script&setup=true&lang.ts
1456
- var _hoisted_1$14 = {
1457
- key: 0,
1458
- class: "property-name-pattern-properties"
1459
- };
1460
- var _hoisted_2$9 = {
1461
- key: 1,
1462
- class: "property-name-additional-properties"
1463
- };
1464
- var _hoisted_3$8 = {
1465
- key: 1,
1466
- class: "property-description"
1467
- };
1468
- var _hoisted_4$4 = {
1469
- key: 4,
1470
- class: "children"
1471
- };
1472
- var _hoisted_5$4 = {
1473
- key: 5,
1474
- class: "children"
1475
- };
1476
- //#endregion
1477
- //#region src/components/Content/Schema/SchemaProperty.vue
1478
- var SchemaProperty_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1479
- __name: "SchemaProperty",
1480
- props: {
1481
- is: {},
1482
- schema: {},
1483
- noncollapsible: { type: Boolean },
1484
- level: { default: 0 },
1485
- name: {},
1486
- required: {
1487
- type: Boolean,
1488
- default: false
1489
- },
1490
- compact: {
1491
- type: Boolean,
1492
- default: false
1493
- },
1494
- discriminator: {},
1495
- description: {},
1496
- hideModelNames: {
1497
- type: Boolean,
1498
- default: false
1499
- },
1500
- hideHeading: { type: Boolean },
1501
- modelName: {},
1502
- variant: {},
1503
- breadcrumb: {},
1504
- eventBus: {},
1505
- options: {},
1506
- propertyNamesEnum: {}
1507
- },
1508
- setup(__props) {
1509
- const props = __props;
1510
- /** Simplified composition with `null` type. */
1511
- const optimizedValue = computed(() => optimizeValueForDisplay(props.schema));
1512
- const childBreadcrumb = computed(() => props.breadcrumb && props.name ? [...props.breadcrumb, props.name] : void 0);
1513
- const shouldHaveLink = computed(() => props.level <= 1);
1514
- /** Checks if array items have complex structure */
1515
- const hasComplexArrayItemsComputed = computed(() => hasComplexArrayItems(optimizedValue.value));
1516
- /** Check if enum should be displayed (from value schema or from propertyNames) */
1517
- const hasEnum = computed(() => enumValues.value.length > 0);
1518
- /** Determine if object properties should be displayed */
1519
- const shouldRenderObjectProperties = computed(() => {
1520
- const value = optimizedValue.value;
1521
- if (!value) return false;
1522
- return isTypeObject(value) && ("properties" in value || "additionalProperties" in value);
1523
- });
1524
- /** Determine if array of objects should be rendered */
1525
- const shouldRenderArrayOfObjects = computed(() => {
1526
- const value = optimizedValue.value;
1527
- if (!value || !isArraySchema(value) || typeof value.items !== "object") return false;
1528
- return hasComplexArrayItemsComputed.value;
1529
- });
1530
- /** Extract enum values from schema or array items */
1531
- const enumValues = computed(() => getEnumValues(optimizedValue.value));
1532
- /** Generate property description from type/format */
1533
- const propertyDescription = computed(() => getPropertyDescription(optimizedValue.value));
1534
- /** Determine if description should be displayed */
1535
- const displayDescription = computed(() => shouldDisplayDescription(optimizedValue.value, props.description));
1536
- /**
1537
- * When the property already renders the description, avoid repeating it in the nested object schema card.
1538
- */
1539
- const objectSchemaForChildren = computed(() => {
1540
- const value = optimizedValue.value;
1541
- if (!value || !displayDescription.value || !("description" in value)) return value;
1542
- const { description: _description, ...schemaWithoutDescription } = value;
1543
- return schemaWithoutDescription;
1544
- });
1545
- /** Determine if property heading should be displayed */
1546
- const shouldDisplayHeadingComputed = computed(() => shouldDisplayHeading(optimizedValue.value, props.name, props.required));
1547
- /** Computes which compositions should be rendered and with which values */
1548
- const compositionsToRender = computed(() => getCompositionsToRender(optimizedValue.value));
1549
- /** Get resolved array items for rendering */
1550
- const resolvedArrayItems = computed(() => {
1551
- const value = optimizedValue.value;
1552
- if (!value || !isArraySchema(value) || typeof value.items !== "object") return;
1553
- return resolve.schema(value.items);
1554
- });
1555
- /** Check if discriminator matches current property */
1556
- const isDiscriminatorProperty = computed(() => Boolean(props.name && props.discriminator?.propertyName === props.name));
1557
- return (_ctx, _cache) => {
1558
- return openBlock(), createBlock(resolveDynamicComponent(__props.is ?? "li"), { class: normalizeClass(["property", [`property--level-${__props.level}`, {
1559
- "property--compact": __props.compact,
1560
- "property--deprecated": optimizedValue.value?.deprecated
1561
- }]]) }, {
1562
- default: withCtx(() => [
1563
- shouldDisplayHeadingComputed.value ? (openBlock(), createBlock(SchemaPropertyHeading_default, {
1564
- key: 0,
1565
- class: "group",
1566
- enum: hasEnum.value,
1567
- hideModelNames: __props.hideModelNames,
1568
- isDiscriminator: isDiscriminatorProperty.value,
1569
- modelName: __props.modelName,
1570
- required: __props.required,
1571
- value: optimizedValue.value
1572
- }, createSlots({ _: 2 }, [__props.name ? {
1573
- name: "name",
1574
- fn: withCtx(() => [createVNode(unref(WithBreadcrumb_default), {
1575
- breadcrumb: shouldHaveLink.value ? childBreadcrumb.value : void 0,
1576
- eventBus: __props.eventBus
1577
- }, {
1578
- default: withCtx(() => [__props.variant === "patternProperties" ? (openBlock(), createElementBlock("span", _hoisted_1$14, [createVNode(unref(ScalarWrappingText), {
1579
- preset: "property",
1580
- text: __props.name
1581
- }, null, 8, ["text"])])) : __props.variant === "additionalProperties" ? (openBlock(), createElementBlock("span", _hoisted_2$9, [createVNode(unref(ScalarWrappingText), {
1582
- preset: "property",
1583
- text: __props.name
1584
- }, null, 8, ["text"])])) : (openBlock(), createBlock(unref(ScalarWrappingText), {
1585
- key: 2,
1586
- preset: "property",
1587
- text: __props.name
1588
- }, null, 8, ["text"]))]),
1589
- _: 1
1590
- }, 8, ["breadcrumb", "eventBus"])]),
1591
- key: "0"
1592
- } : void 0, optimizedValue.value?.example !== void 0 ? {
1593
- name: "example",
1594
- fn: withCtx(() => [createTextVNode(" Example: " + toDisplayString(optimizedValue.value.example), 1)]),
1595
- key: "1"
1596
- } : void 0]), 1032, [
1597
- "enum",
1598
- "hideModelNames",
1599
- "isDiscriminator",
1600
- "modelName",
1601
- "required",
1602
- "value"
1603
- ])) : createCommentVNode("", true),
1604
- displayDescription.value || propertyDescription.value ? (openBlock(), createElementBlock("div", _hoisted_3$8, [createVNode(unref(ScalarMarkdown), { value: displayDescription.value || propertyDescription.value || "" }, null, 8, ["value"])])) : createCommentVNode("", true),
1605
- __props.propertyNamesEnum && __props.propertyNamesEnum.length > 0 ? (openBlock(), createBlock(SchemaEnums_default, {
1606
- key: 2,
1607
- propertyNames: "",
1608
- value: { enum: __props.propertyNamesEnum }
1609
- }, null, 8, ["value"])) : createCommentVNode("", true),
1610
- enumValues.value.length > 0 ? (openBlock(), createBlock(SchemaEnums_default, {
1611
- key: 3,
1612
- value: optimizedValue.value
1613
- }, null, 8, ["value"])) : createCommentVNode("", true),
1614
- shouldRenderObjectProperties.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [createVNode(Schema_default, {
1615
- breadcrumb: childBreadcrumb.value,
1616
- compact: __props.compact,
1617
- eventBus: __props.eventBus,
1618
- level: __props.level + 1,
1619
- name: __props.name,
1620
- noncollapsible: __props.noncollapsible,
1621
- options: __props.options,
1622
- schema: objectSchemaForChildren.value
1623
- }, null, 8, [
1624
- "breadcrumb",
1625
- "compact",
1626
- "eventBus",
1627
- "level",
1628
- "name",
1629
- "noncollapsible",
1630
- "options",
1631
- "schema"
1632
- ])])) : createCommentVNode("", true),
1633
- shouldRenderArrayOfObjects.value && resolvedArrayItems.value ? (openBlock(), createElementBlock("div", _hoisted_5$4, [createVNode(Schema_default, {
1634
- compact: __props.compact,
1635
- eventBus: __props.eventBus,
1636
- level: __props.level + 1,
1637
- name: __props.name,
1638
- noncollapsible: __props.noncollapsible,
1639
- options: __props.options,
1640
- schema: unref(resolve).schema(resolvedArrayItems.value)
1641
- }, null, 8, [
1642
- "compact",
1643
- "eventBus",
1644
- "level",
1645
- "name",
1646
- "noncollapsible",
1647
- "options",
1648
- "schema"
1649
- ])])) : createCommentVNode("", true),
1650
- (openBlock(true), createElementBlock(Fragment, null, renderList(compositionsToRender.value, (compositionData) => {
1651
- return openBlock(), createBlock(SchemaComposition_default, {
1652
- key: compositionData.composition,
1653
- breadcrumb: __props.breadcrumb,
1654
- compact: __props.compact,
1655
- composition: compositionData.composition,
1656
- discriminator: __props.schema?.discriminator,
1657
- eventBus: __props.eventBus,
1658
- hideHeading: __props.hideHeading,
1659
- level: __props.level,
1660
- name: __props.name,
1661
- noncollapsible: __props.noncollapsible,
1662
- options: __props.options,
1663
- schema: compositionData.value
1664
- }, null, 8, [
1665
- "breadcrumb",
1666
- "compact",
1667
- "composition",
1668
- "discriminator",
1669
- "eventBus",
1670
- "hideHeading",
1671
- "level",
1672
- "name",
1673
- "noncollapsible",
1674
- "options",
1675
- "schema"
1676
- ]);
1677
- }), 128)),
1678
- createVNode(unref(SpecificationExtension_default), { value: optimizedValue.value }, null, 8, ["value"])
1679
- ]),
1680
- _: 1
1681
- }, 8, ["class"]);
1682
- };
1683
- }
1684
- }), [["__scopeId", "data-v-a72e0d1d"]]);
1685
- //#endregion
1686
- //#region src/components/Content/Schema/SchemaObjectProperties.vue
1687
- var SchemaObjectProperties_default = /* @__PURE__ */ defineComponent({
1688
- __name: "SchemaObjectProperties",
1689
- props: {
1690
- schema: {},
1691
- discriminator: {},
1692
- compact: { type: Boolean },
1693
- hideHeading: { type: Boolean },
1694
- level: {},
1695
- hideModelNames: { type: Boolean },
1696
- breadcrumb: {},
1697
- eventBus: {},
1698
- options: {}
1699
- },
1700
- setup(__props) {
1701
- /**
1702
- * Sorts properties by required status first, then alphabetically.
1703
- * Required properties appear first, followed by optional properties.
1704
- */
1705
- const sortedProperties = computed(() => sortPropertyNames(__props.schema, __props.discriminator, __props.options));
1706
- /**
1707
- * Get the display name for additional properties.
1708
- *
1709
- * Checks x-additionalPropertiesName extension first, then falls back to the
1710
- * propertyNames schema title if available.
1711
- */
1712
- const getAdditionalPropertiesName = (_additionalProperties, _propertyNames) => {
1713
- const additionalProperties = typeof _additionalProperties === "boolean" ? _additionalProperties : resolve.schema(_additionalProperties);
1714
- if (typeof additionalProperties === "object" && typeof additionalProperties["x-additionalPropertiesName"] === "string" && additionalProperties["x-additionalPropertiesName"].trim().length > 0) return `${additionalProperties["x-additionalPropertiesName"].trim()}`;
1715
- if (_propertyNames) {
1716
- const resolved = resolve.schema(_propertyNames);
1717
- if (resolved?.title) return resolved.title;
1718
- }
1719
- return "propertyName";
1720
- };
1721
- /**
1722
- * Extract enum values from the propertyNames schema.
1723
- *
1724
- * JSON Schema's propertyNames keyword constrains which keys are valid
1725
- * in an object with additionalProperties. When it contains an enum,
1726
- * these are the allowed key names.
1727
- */
1728
- const getPropertyNamesEnum = (_propertyNames) => {
1729
- if (!_propertyNames) return;
1730
- const resolved = resolve.schema(_propertyNames);
1731
- if (resolved && "enum" in resolved && Array.isArray(resolved.enum) && resolved.enum.length > 0) return resolved.enum;
1732
- };
1733
- /** Enum values for the property keys, derived from propertyNames if present. */
1734
- const additionalPropertiesEnum = computed(() => {
1735
- if (!isTypeObject(__props.schema) || !__props.schema.additionalProperties) return;
1736
- return getPropertyNamesEnum(__props.schema.propertyNames);
1737
- });
1738
- /**
1739
- * Get the value for additional properties.
1740
- *
1741
- * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.
1742
- */
1743
- const getAdditionalPropertiesValue = (additionalProperties) => {
1744
- if (additionalProperties === true || typeof additionalProperties === "object" && Object.keys(additionalProperties).length === 0 || typeof additionalProperties !== "object" || !("type" in additionalProperties)) return {
1745
- type: "anything",
1746
- ...typeof additionalProperties === "object" ? additionalProperties : {}
1747
- };
1748
- return additionalProperties;
1749
- };
1750
- return (_ctx, _cache) => {
1751
- return openBlock(), createElementBlock(Fragment, null, [
1752
- unref(isTypeObject)(__props.schema) && __props.schema.properties ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(sortedProperties.value, (property) => {
1753
- return openBlock(), createBlock(SchemaProperty_default, {
1754
- key: property,
1755
- breadcrumb: __props.breadcrumb,
1756
- compact: __props.compact,
1757
- discriminator: __props.discriminator,
1758
- eventBus: __props.eventBus,
1759
- hideHeading: __props.hideHeading,
1760
- hideModelNames: __props.hideModelNames,
1761
- level: __props.level,
1762
- name: property,
1763
- options: __props.options,
1764
- required: __props.schema.required?.includes(property),
1765
- schema: unref(resolve).schema(__props.schema.properties[property])
1766
- }, null, 8, [
1767
- "breadcrumb",
1768
- "compact",
1769
- "discriminator",
1770
- "eventBus",
1771
- "hideHeading",
1772
- "hideModelNames",
1773
- "level",
1774
- "name",
1775
- "options",
1776
- "required",
1777
- "schema"
1778
- ]);
1779
- }), 128)) : createCommentVNode("", true),
1780
- unref(isTypeObject)(__props.schema) && __props.schema.patternProperties ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Object.entries(__props.schema.patternProperties), ([key, property]) => {
1781
- return openBlock(), createBlock(SchemaProperty_default, {
1782
- key,
1783
- breadcrumb: __props.breadcrumb,
1784
- compact: __props.compact,
1785
- discriminator: __props.discriminator,
1786
- eventBus: __props.eventBus,
1787
- hideHeading: __props.hideHeading,
1788
- hideModelNames: __props.hideModelNames,
1789
- level: __props.level,
1790
- name: key,
1791
- options: __props.options,
1792
- schema: unref(resolve).schema(property)
1793
- }, null, 8, [
1794
- "breadcrumb",
1795
- "compact",
1796
- "discriminator",
1797
- "eventBus",
1798
- "hideHeading",
1799
- "hideModelNames",
1800
- "level",
1801
- "name",
1802
- "options",
1803
- "schema"
1804
- ]);
1805
- }), 128)) : createCommentVNode("", true),
1806
- unref(isTypeObject)(__props.schema) && __props.schema.additionalProperties ? (openBlock(), createBlock(SchemaProperty_default, {
1807
- key: 2,
1808
- breadcrumb: __props.breadcrumb,
1809
- compact: __props.compact,
1810
- discriminator: __props.discriminator,
1811
- eventBus: __props.eventBus,
1812
- hideHeading: __props.hideHeading,
1813
- hideModelNames: __props.hideModelNames,
1814
- level: __props.level,
1815
- name: getAdditionalPropertiesName(__props.schema.additionalProperties, __props.schema.propertyNames),
1816
- noncollapsible: "",
1817
- options: __props.options,
1818
- propertyNamesEnum: additionalPropertiesEnum.value,
1819
- schema: getAdditionalPropertiesValue(__props.schema.additionalProperties),
1820
- variant: "additionalProperties"
1821
- }, null, 8, [
1822
- "breadcrumb",
1823
- "compact",
1824
- "discriminator",
1825
- "eventBus",
1826
- "hideHeading",
1827
- "hideModelNames",
1828
- "level",
1829
- "name",
1830
- "options",
1831
- "propertyNamesEnum",
1832
- "schema"
1833
- ])) : createCommentVNode("", true)
1834
- ], 64);
1835
- };
1836
- }
1837
- });
1838
- //#endregion
1839
- //#region src/components/Content/Schema/Schema.vue?vue&type=script&setup=true&lang.ts
1840
- var _hoisted_1$13 = {
1841
- key: 0,
1842
- class: "schema-card-description"
1843
- };
1844
- var _hoisted_2$8 = {
1845
- key: 1,
1846
- class: "pt-2"
1847
- };
1848
- var _hoisted_3$7 = {
1849
- key: 0,
1850
- class: "schema-properties"
1851
- };
1852
- //#endregion
1853
- //#region src/components/Content/Schema/Schema.vue
1854
- var Schema_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1855
- __name: "Schema",
1856
- props: {
1857
- schema: {},
1858
- level: { default: 0 },
1859
- name: {},
1860
- compact: { type: Boolean },
1861
- noncollapsible: {
1862
- type: Boolean,
1863
- default: false
1864
- },
1865
- hideHeading: { type: Boolean },
1866
- additionalProperties: { type: Boolean },
1867
- hideModelNames: {
1868
- type: Boolean,
1869
- default: false
1870
- },
1871
- discriminator: {},
1872
- breadcrumb: {},
1873
- eventBus: {},
1874
- options: {}
1875
- },
1876
- setup(__props) {
1877
- /**
1878
- * Determines whether to show the collapse/expand toggle button.
1879
- * We hide the toggle for non-collapsible schemas and root-level schemas.
1880
- */
1881
- const shouldShowToggle = computed(() => {
1882
- return !__props.noncollapsible && __props.level > 0;
1883
- });
1884
- /** Gets the description to show for the schema */
1885
- const schemaDescription = computed(() => {
1886
- if (__props.schema?.allOf && __props.schema.allOf.length > 0 && __props.name === "Request Body") return __props.schema.description || __props.schema.allOf[0]?.description || null;
1887
- if (!__props.schema?.description || typeof __props.schema.description !== "string") return null;
1888
- if (__props.schema.oneOf || __props.schema.anyOf) return null;
1889
- if (__props.schema.enum) return null;
1890
- if (!("properties" in __props.schema) && !("patternProperties" in __props.schema) && !("additionalProperties" in __props.schema)) return null;
1891
- return __props.schema.description;
1892
- });
1893
- const handleClick = (e) => __props.noncollapsible && e.stopPropagation();
1894
- return (_ctx, _cache) => {
1895
- return typeof __props.schema === "object" && Object.keys(__props.schema).length ? (openBlock(), createBlock(unref(Disclosure), {
1896
- key: 0,
1897
- defaultOpen: __props.noncollapsible
1898
- }, {
1899
- default: withCtx(({ open }) => [createElementVNode("div", { class: normalizeClass(["schema-card", [
1900
- `schema-card--level-${__props.level}`,
1901
- {
1902
- "schema-card--compact": __props.compact,
1903
- "schema-card--open": open
1904
- },
1905
- { "border-t": __props.additionalProperties && open }
1906
- ]]) }, [
1907
- schemaDescription.value ? (openBlock(), createElementBlock("div", _hoisted_1$13, [createVNode(unref(ScalarMarkdown), { value: schemaDescription.value }, null, 8, ["value"])])) : createCommentVNode("", true),
1908
- unref(isEmptySchemaObject)(__props.schema) ? (openBlock(), createElementBlock("div", _hoisted_2$8, " Empty object ")) : createCommentVNode("", true),
1909
- createElementVNode("div", { class: normalizeClass(["schema-properties", { "schema-properties-open": open }]) }, [__props.additionalProperties ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3$7, [createVNode(unref(DisclosureButton), {
1910
- as: "button",
1911
- class: "schema-card-title schema-card-title--compact",
1912
- onClickCapture: handleClick
1913
- }, {
1914
- default: withCtx(() => [
1915
- createVNode(unref(ScalarIcon), {
1916
- class: "schema-card-title-icon",
1917
- icon: "Add",
1918
- size: "sm"
1919
- }),
1920
- _cache[0] || (_cache[0] = createTextVNode(" Show additional properties ", -1)),
1921
- __props.name ? (openBlock(), createBlock(ScreenReader_default, { key: 0 }, {
1922
- default: withCtx(() => [createTextVNode("for " + toDisplayString(__props.name), 1)]),
1923
- _: 1
1924
- })) : createCommentVNode("", true)
1925
- ]),
1926
- _: 1
1927
- })], 512)), [[vShow, !open]]) : shouldShowToggle.value ? withDirectives((openBlock(), createBlock(unref(DisclosureButton), {
1928
- key: 1,
1929
- as: __props.noncollapsible ? "div" : "button",
1930
- class: normalizeClass(["schema-card-title", { "schema-card-title--compact": __props.compact }]),
1931
- style: normalizeStyle({ top: `calc(var(--refs-viewport-offset) + calc(var(--schema-title-height) * ${__props.level}))` }),
1932
- onClickCapture: handleClick
1933
- }, {
1934
- default: withCtx(() => [__props.compact ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1935
- createVNode(unref(ScalarIcon), {
1936
- class: normalizeClass(["schema-card-title-icon", { "schema-card-title-icon--open": open }]),
1937
- icon: "Add",
1938
- size: "sm"
1939
- }, null, 8, ["class"]),
1940
- open ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" Hide " + toDisplayString(__props.schema?.title ?? "Child Attributes"), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" Show " + toDisplayString(__props.schema?.title ?? "Child Attributes"), 1)], 64)),
1941
- __props.name ? (openBlock(), createBlock(ScreenReader_default, { key: 2 }, {
1942
- default: withCtx(() => [createTextVNode("for " + toDisplayString(__props.name), 1)]),
1943
- _: 1
1944
- })) : createCommentVNode("", true)
1945
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(ScalarIcon), {
1946
- class: normalizeClass(["schema-card-title-icon", { "schema-card-title-icon--open": open }]),
1947
- icon: "Add",
1948
- size: "sm"
1949
- }, null, 8, ["class"]), createVNode(SchemaHeading_default, {
1950
- name: __props.schema?.title ?? __props.name,
1951
- value: __props.schema
1952
- }, null, 8, ["name", "value"])], 64))]),
1953
- _: 2
1954
- }, 1032, [
1955
- "as",
1956
- "class",
1957
- "style"
1958
- ])), [[vShow, !__props.hideHeading && !(__props.noncollapsible && __props.compact)]]) : createCommentVNode("", true), !__props.additionalProperties || open ? (openBlock(), createBlock(unref(DisclosurePanel), {
1959
- key: 2,
1960
- as: "ul",
1961
- static: !shouldShowToggle.value
1962
- }, {
1963
- default: withCtx(() => [unref(isTypeObject)(__props.schema) ? (openBlock(), createBlock(SchemaObjectProperties_default, {
1964
- key: 0,
1965
- breadcrumb: __props.breadcrumb,
1966
- compact: __props.compact,
1967
- discriminator: __props.discriminator,
1968
- eventBus: __props.eventBus,
1969
- hideHeading: __props.hideHeading,
1970
- hideModelNames: __props.hideModelNames,
1971
- level: __props.level + 1,
1972
- options: __props.options,
1973
- schema: __props.schema
1974
- }, null, 8, [
1975
- "breadcrumb",
1976
- "compact",
1977
- "discriminator",
1978
- "eventBus",
1979
- "hideHeading",
1980
- "hideModelNames",
1981
- "level",
1982
- "options",
1983
- "schema"
1984
- ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [__props.schema ? (openBlock(), createBlock(SchemaProperty_default, {
1985
- key: 0,
1986
- breadcrumb: __props.breadcrumb,
1987
- compact: __props.compact,
1988
- eventBus: __props.eventBus,
1989
- hideHeading: __props.hideHeading,
1990
- hideModelNames: __props.hideModelNames,
1991
- level: __props.level,
1992
- options: __props.options,
1993
- schema: __props.schema
1994
- }, null, 8, [
1995
- "breadcrumb",
1996
- "compact",
1997
- "eventBus",
1998
- "hideHeading",
1999
- "hideModelNames",
2000
- "level",
2001
- "options",
2002
- "schema"
2003
- ])) : createCommentVNode("", true)], 64))]),
2004
- _: 1
2005
- }, 8, ["static"])) : createCommentVNode("", true)], 2)
2006
- ], 2)]),
2007
- _: 1
2008
- }, 8, ["defaultOpen"])) : createCommentVNode("", true);
2009
- };
2010
- }
2011
- }), [["__scopeId", "data-v-d9bd8110"]]);
2012
- //#endregion
2013
- //#region src/components/HttpMethod/HttpMethod.vue
2014
- var HttpMethod_default = /* @__PURE__ */ defineComponent({
2015
- __name: "HttpMethod",
2016
- props: {
2017
- as: {},
2018
- property: {},
2019
- short: { type: Boolean },
2020
- method: {}
2021
- },
2022
- setup(__props) {
2023
- const props = __props;
2024
- /** Grabs the method info object which contains abbreviation, color, and background color etc */
2025
- const httpMethodInfo = computed(() => getHttpMethodInfo(String(props.method || "")));
2026
- /** Full method name */
2027
- const normalized = computed(() => normalizeHttpMethod(props.method));
2028
- return (_ctx, _cache) => {
2029
- return openBlock(), createBlock(resolveDynamicComponent(__props.as ?? "span"), {
2030
- class: "uppercase",
2031
- style: normalizeStyle({ [__props.property || "color"]: httpMethodInfo.value.colorVar })
2032
- }, {
2033
- default: withCtx(() => [renderSlot(_ctx.$slots, "default"), createTextVNode(" " + toDisplayString(__props.short ? httpMethodInfo.value.short : normalized.value), 1)]),
2034
- _: 3
2035
- }, 8, ["style"]);
2036
- };
2037
- }
2038
- });
2039
- //#endregion
2040
- //#region src/features/Operation/helpers/filter-selected-security.ts
2041
- /** Builds a quick cache key from the sorted object keys */
2042
- var getKey = (requirement) => Object.keys(requirement).sort().join(",");
2043
- /**
2044
- * Find the intersection between which security is selected on the document and what this operation requires
2045
- *
2046
- * If there is no overlap, we return the first requirement
2047
- */
2048
- var filterSelectedSecurity = (document, operation, selectedSecurityDocument, selectedSecurityOperation, securitySchemes = {}) => {
2049
- const securityRequirements = operation?.security ?? document.security ?? [];
2050
- /** The selected security keys for the document */
2051
- const selectedSecurity = getSelectedSecurity(selectedSecurityDocument, selectedSecurityOperation, securityRequirements);
2052
- /** Build a set for O(1) lookup */
2053
- const requirementSet = new Set(securityRequirements.map((r) => getKey(r)));
2054
- const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex];
2055
- if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) return getSecuritySchemes(securitySchemes, [selectedRequirement]);
2056
- for (const selected of selectedSecurity.selectedSchemes) if (requirementSet.has(getKey(selected))) return getSecuritySchemes(securitySchemes, [selected]);
2057
- /**
2058
- * If we are selected security on the document,
2059
- * we should show the first requirement of the operation to show auth is required
2060
- */
2061
- if (operation?.security?.length) return getSecuritySchemes(securitySchemes, securityRequirements.slice(0, 1));
2062
- return [];
2063
- };
2064
- //#endregion
2065
- //#region src/features/Operation/helpers/get-first-server.ts
2066
- /**
2067
- * Iterate through all available servers and pick the first one
2068
- *
2069
- * @example
2070
- * getFirstServer([operation.servers, pathItem.servers, server])
2071
- */
2072
- var getFirstServer = (...availableServers) => {
2073
- for (const serverSource of availableServers) {
2074
- if (!serverSource) continue;
2075
- if (!Array.isArray(serverSource)) {
2076
- const resolvedServer = getResolvedRef(serverSource);
2077
- if (resolvedServer?.url) return resolvedServer;
2078
- continue;
2079
- }
2080
- for (const server of serverSource) {
2081
- const resolvedServer = getResolvedRef(server);
2082
- if (resolvedServer?.url) return resolvedServer;
2083
- }
2084
- }
2085
- return null;
2086
- };
2087
- //#endregion
2088
- //#region src/components/OperationPath.vue?vue&type=script&setup=true&lang.ts
2089
- var _hoisted_1$12 = { key: 0 };
2090
- //#endregion
2091
- //#region src/components/OperationPath.vue
2092
- var OperationPath_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2093
- __name: "OperationPath",
2094
- props: {
2095
- path: {},
2096
- deprecated: { type: Boolean }
2097
- },
2098
- setup(__props) {
2099
- const props = __props;
2100
- const isVariable = (part) => part.startsWith("{") && part.endsWith("}");
2101
- const pathParts = computed(() => props.path.split(/({[^}]+})/));
2102
- return (_ctx, _cache) => {
2103
- return openBlock(), createElementBlock("span", { class: normalizeClass(["operation-path", { deprecated: __props.deprecated }]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(pathParts.value, (part, i) => {
2104
- return openBlock(), createElementBlock(Fragment, { key: i }, [isVariable(part) ? (openBlock(), createElementBlock("em", _hoisted_1$12, toDisplayString(part), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part), 1)], 64))], 64);
2105
- }), 128))], 2);
2106
- };
2107
- }
2108
- }), [["__scopeId", "data-v-ec6c8861"]]);
2109
- //#endregion
2110
- //#region src/features/example-responses/ExampleSchema.vue?vue&type=script&setup=true&lang.ts
2111
- var VIRTUALIZATION_THRESHOLD$1 = 2e4;
2112
- //#endregion
2113
- //#region src/features/example-responses/ExampleSchema.vue
2114
- var ExampleSchema_default = /* @__PURE__ */ defineComponent({
2115
- __name: "ExampleSchema",
2116
- props: {
2117
- id: {},
2118
- schema: {}
2119
- },
2120
- setup(__props) {
2121
- const schemaContent = computed(() => {
2122
- if (!__props.schema) return;
2123
- return prettyPrintJson(getResolvedRefDeep(__props.schema));
2124
- });
2125
- const shouldVirtualizeSchema = computed(() => {
2126
- return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD$1;
2127
- });
2128
- return (_ctx, _cache) => {
2129
- return !shouldVirtualizeSchema.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
2130
- key: 0,
2131
- id: __props.id,
2132
- class: "bg-b-2",
2133
- lang: "json",
2134
- prettyPrintedContent: schemaContent.value ?? ""
2135
- }, null, 8, ["id", "prettyPrintedContent"])) : (openBlock(), createBlock(unref(ScalarVirtualText), {
2136
- key: 1,
2137
- id: __props.id,
2138
- containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
2139
- contentClass: "language-plaintext whitespace-pre font-code text-base",
2140
- lineHeight: 20,
2141
- text: schemaContent.value ?? ""
2142
- }, null, 8, ["id", "text"]));
2143
- };
2144
- }
2145
- });
2146
- //#endregion
2147
- //#region src/features/example-responses/ExampleResponse.vue?vue&type=script&setup=true&lang.ts
2148
- var _hoisted_1$11 = {
2149
- key: 2,
2150
- class: "empty-state"
2151
- };
2152
- var VIRTUALIZATION_THRESHOLD = 2e4;
2153
- //#endregion
2154
- //#region src/features/example-responses/ExampleResponse.vue
2155
- var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2156
- __name: "ExampleResponse",
2157
- props: {
2158
- response: {},
2159
- example: {}
2160
- },
2161
- setup(__props) {
2162
- /** Get content from the appropriate source */
2163
- const getContent = () => {
2164
- if (__props.example !== void 0) return getResolvedRefDeep(__props.example)?.value ?? "";
2165
- if (__props.response?.schema) return getExampleFromSchema(getResolvedRef(__props.response.schema), {
2166
- emptyString: "string",
2167
- mode: "read"
2168
- });
2169
- };
2170
- /** Pre-pretty printed content string, avoids multiple pretty prints*/
2171
- const prettyPrintedContent = computed(() => {
2172
- const content = getContent();
2173
- if (content === void 0) return;
2174
- return prettyPrintJson(content);
2175
- });
2176
- const shouldVirtualize = computed(() => {
2177
- if (prettyPrintedContent.value === void 0) return false;
2178
- return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD;
2179
- });
2180
- return (_ctx, _cache) => {
2181
- return prettyPrintedContent.value !== void 0 && !shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
2182
- key: 0,
2183
- class: "bg-b-2",
2184
- lang: "json",
2185
- prettyPrintedContent: prettyPrintedContent.value
2186
- }, null, 8, ["prettyPrintedContent"])) : prettyPrintedContent.value !== void 0 && shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarVirtualText), {
2187
- key: 1,
2188
- containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
2189
- contentClass: "language-plaintext whitespace-pre font-code text-base",
2190
- lineHeight: 20,
2191
- text: prettyPrintedContent.value
2192
- }, null, 8, ["text"])) : (openBlock(), createElementBlock("div", _hoisted_1$11, " No Body "));
2193
- };
2194
- }
2195
- }), [["__scopeId", "data-v-dcf1403d"]]);
2196
- //#endregion
2197
- //#region src/features/example-responses/ExampleResponseTab.vue
2198
- var ExampleResponseTab_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2199
- __name: "ExampleResponseTab",
2200
- setup(__props) {
2201
- return (_ctx, _cache) => {
2202
- return openBlock(), createBlock(unref(Tab), { as: "template" }, {
2203
- default: withCtx(({ selected }) => [createElementVNode("button", {
2204
- class: normalizeClass(["tab", { "tab-selected": selected }]),
2205
- type: "button"
2206
- }, [createElementVNode("span", null, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 2)]),
2207
- _: 3
2208
- });
2209
- };
2210
- }
2211
- }), [["__scopeId", "data-v-804dba49"]]);
2212
- //#endregion
2213
- //#region src/features/example-responses/ExampleResponseTabList.vue
2214
- var ExampleResponseTabList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2215
- __name: "ExampleResponseTabList",
2216
- emits: ["change"],
2217
- setup(__props, { emit: __emit }) {
2218
- const emit = __emit;
2219
- const changeTab = (index) => {
2220
- emit("change", index);
2221
- };
2222
- return (_ctx, _cache) => {
2223
- return openBlock(), createBlock(unref(ScalarCardHeader), { class: "scalar-card-header scalar-card-header-tabs" }, {
2224
- actions: withCtx(() => [renderSlot(_ctx.$slots, "actions", {}, void 0, true)]),
2225
- default: withCtx(() => [createVNode(unref(TabGroup), { onChange: changeTab }, {
2226
- default: withCtx(() => [createVNode(unref(TabList), { class: "tab-list custom-scroll" }, {
2227
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
2228
- _: 3
2229
- })]),
2230
- _: 3
2231
- })]),
2232
- _: 3
2233
- });
2234
- };
2235
- }
2236
- }), [["__scopeId", "data-v-fec8fbbb"]]);
2237
- //#endregion
2238
- //#region src/features/example-responses/has-response-content.ts
2239
- /**
2240
- * Checks if a media type object has any displayable content.
2241
- * This includes having a schema, a single example, or multiple examples.
2242
- *
2243
- * Note: We use explicit property checks for `example` because falsy values
2244
- * like `0`, `false`, and `""` are valid JSON examples that should be displayed.
2245
- * We still treat `null` as "no content" since it explicitly indicates absence.
2246
- */
2247
- function hasMediaTypeContent(mediaType) {
2248
- if (!mediaType) return false;
2249
- const hasSchema = Boolean(mediaType.schema);
2250
- const hasExample = "example" in mediaType && mediaType.example !== null;
2251
- const hasExamples = Boolean(mediaType.examples);
2252
- return hasSchema || hasExample || hasExamples;
2253
- }
2254
- function isResponseKey(responseKey) {
2255
- return responseKey === "default" || /^[1-5][0-9]{2}$/.test(responseKey) || /^[1-5]XX$/.test(responseKey);
2256
- }
2257
- /**
2258
- * Checks if a response object has body content (schema, example, or examples).
2259
- * Looks through common media types in priority order.
2260
- */
2261
- function hasResponseContent(response, responseKey) {
2262
- if (responseKey !== void 0) {
2263
- if (!isResponseKey(responseKey)) return false;
2264
- return Boolean(response);
2265
- }
2266
- const normalizedContent = normalizeMimeTypeObject(response?.content);
2267
- const keys = getObjectKeys(normalizedContent ?? {});
2268
- return hasMediaTypeContent(normalizedContent?.["application/json"] ?? normalizedContent?.["application/xml"] ?? normalizedContent?.["text/plain"] ?? normalizedContent?.["text/html"] ?? normalizedContent?.["*/*"] ?? normalizedContent?.[keys[0] ?? ""]);
2269
- }
2270
- //#endregion
2271
- //#region src/features/example-responses/ExampleResponses.vue?vue&type=script&setup=true&lang.ts
2272
- var _hoisted_1$10 = {
2273
- key: 1,
2274
- class: "scalar-card-checkbox"
2275
- };
2276
- var _hoisted_2$7 = ["aria-controls"];
2277
- var _hoisted_3$6 = { class: "response-description" };
2278
- //#endregion
2279
- //#region src/features/example-responses/ExampleResponses.vue
2280
- var ExampleResponses_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2281
- __name: "ExampleResponses",
2282
- props: { responses: {} },
2283
- setup(__props) {
2284
- const id = useId();
2285
- const { copyToClipboard } = useClipboard();
2286
- const orderedStatusCodes = computed(() => Object.keys(__props.responses ?? {}).sort());
2287
- const statusCodesWithContent = computed(() => orderedStatusCodes.value.filter((statusCode) => hasResponseContent(getResolvedRef(__props.responses?.[statusCode]), statusCode)));
2288
- const selectedResponseIndex = ref(0);
2289
- /**
2290
- * Clamp the selected index when the filtered list shrinks.
2291
- * Without this, the index can become out of bounds and cause a mismatch
2292
- * between the visible tabs and the displayed content.
2293
- *
2294
- * We also reset `selectedExampleKey` to match the behavior of `changeTab`,
2295
- * since the new response may not have the same example keys.
2296
- */
2297
- watch(statusCodesWithContent, (codes) => {
2298
- if (codes.length === 0) {
2299
- selectedResponseIndex.value = 0;
2300
- selectedExampleKey.value = "";
2301
- } else if (selectedResponseIndex.value >= codes.length) {
2302
- selectedResponseIndex.value = codes.length - 1;
2303
- selectedExampleKey.value = "";
2304
- }
2305
- });
2306
- const currentResponse = computed(() => {
2307
- const currentStatusCode = toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? "";
2308
- return getResolvedRef(__props.responses?.[currentStatusCode]);
2309
- });
2310
- const currentResponseContent = computed(() => {
2311
- const normalizedContent = normalizeMimeTypeObject(currentResponse.value?.content);
2312
- /** All the keys of the normalized content */
2313
- const keys = getObjectKeys(normalizedContent ?? {});
2314
- return normalizedContent?.["application/json"] ?? normalizedContent?.["application/xml"] ?? normalizedContent?.["text/plain"] ?? normalizedContent?.["text/html"] ?? normalizedContent?.["*/*"] ?? normalizedContent?.[keys[0] ?? ""] ?? void 0;
2315
- });
2316
- const hasMultipleExamples = computed(() => !!currentResponseContent.value?.examples && Object.keys(currentResponseContent.value?.examples ?? {}).length > 1);
2317
- const selectedExampleKey = ref(Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? "");
2318
- /** Get the current example to display */
2319
- const currentExample = computed(() => {
2320
- if (!currentResponseContent.value) return;
2321
- if (hasMultipleExamples.value && selectedExampleKey.value) return currentResponseContent.value.examples?.[selectedExampleKey.value];
2322
- return getExample(currentResponseContent.value, void 0, void 0);
2323
- });
2324
- const changeTab = (index) => {
2325
- selectedResponseIndex.value = index;
2326
- selectedExampleKey.value = "";
2327
- };
2328
- const showSchema = ref(false);
2329
- return (_ctx, _cache) => {
2330
- return statusCodesWithContent.value.length ? (openBlock(), createBlock(unref(ScalarCard), {
2331
- key: 0,
2332
- "aria-label": "Example Responses",
2333
- class: "response-card",
2334
- role: "region"
2335
- }, {
2336
- default: withCtx(() => [
2337
- createVNode(ExampleResponseTabList_default, { onChange: changeTab }, {
2338
- actions: withCtx(() => [currentResponseContent.value?.example ? (openBlock(), createElementBlock("button", {
2339
- key: 0,
2340
- class: "code-copy",
2341
- type: "button",
2342
- onClick: _cache[0] || (_cache[0] = () => unref(copyToClipboard)(currentResponseContent.value?.example))
2343
- }, [createVNode(unref(ScalarIcon), {
2344
- icon: "Clipboard",
2345
- width: "12px"
2346
- })])) : createCommentVNode("", true), currentResponseContent.value?.schema ? (openBlock(), createElementBlock("label", _hoisted_1$10, [
2347
- _cache[4] || (_cache[4] = createTextVNode(" Show Schema ", -1)),
2348
- withDirectives(createElementVNode("input", {
2349
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => showSchema.value = $event),
2350
- "aria-controls": unref(id),
2351
- class: "scalar-card-checkbox-input",
2352
- type: "checkbox"
2353
- }, null, 8, _hoisted_2$7), [[vModelCheckbox, showSchema.value]]),
2354
- _cache[5] || (_cache[5] = createElementVNode("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
2355
- ])) : createCommentVNode("", true)]),
2356
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(statusCodesWithContent.value, (statusCode) => {
2357
- return openBlock(), createBlock(ExampleResponseTab_default, {
2358
- key: statusCode,
2359
- "aria-controls": unref(id)
2360
- }, {
2361
- default: withCtx(() => [createVNode(ScreenReader_default, null, {
2362
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Status:", -1)])]),
2363
- _: 1
2364
- }), createTextVNode(" " + toDisplayString(statusCode), 1)]),
2365
- _: 2
2366
- }, 1032, ["aria-controls"]);
2367
- }), 128))]),
2368
- _: 1
2369
- }),
2370
- createVNode(unref(ScalarCardSection), { class: "grid flex-1" }, {
2371
- default: withCtx(() => [currentResponseContent.value?.schema && showSchema.value ? (openBlock(), createBlock(ExampleSchema_default, {
2372
- key: 0,
2373
- id: unref(id),
2374
- schema: currentResponseContent.value?.schema
2375
- }, null, 8, ["id", "schema"])) : (openBlock(), createBlock(ExampleResponse_default, {
2376
- key: 1,
2377
- id: unref(id),
2378
- example: currentExample.value,
2379
- response: currentResponseContent.value
2380
- }, null, 8, [
2381
- "id",
2382
- "example",
2383
- "response"
2384
- ]))]),
2385
- _: 1
2386
- }),
2387
- currentResponse.value?.description || hasMultipleExamples.value ? (openBlock(), createBlock(unref(ScalarCardFooter), {
2388
- key: 0,
2389
- class: "response-card-footer"
2390
- }, {
2391
- default: withCtx(() => [hasMultipleExamples.value ? (openBlock(), createBlock(unref(ExamplePicker), {
2392
- key: 0,
2393
- modelValue: selectedExampleKey.value,
2394
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedExampleKey.value = $event),
2395
- class: "response-example-selector px-0",
2396
- examples: currentResponseContent.value?.examples
2397
- }, null, 8, ["modelValue", "examples"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$6, [currentResponse.value?.description ? (openBlock(), createBlock(unref(ScalarMarkdown), {
2398
- key: 0,
2399
- class: "response-description-markdown",
2400
- value: currentResponse.value.description
2401
- }, null, 8, ["value"])) : createCommentVNode("", true)])]),
2402
- _: 1
2403
- })) : createCommentVNode("", true)
2404
- ]),
2405
- _: 1
2406
- })) : createCommentVNode("", true);
2407
- };
2408
- }
2409
- }), [["__scopeId", "data-v-5b8a574c"]]);
2410
- //#endregion
2411
- //#region src/features/Operation/components/ContentTypeSelect.vue
2412
- var ContentTypeSelect_default = /* @__PURE__ */ defineComponent({
2413
- inheritAttrs: false,
2414
- __name: "ContentTypeSelect",
2415
- props: /* @__PURE__ */ mergeModels({ content: {} }, {
2416
- "modelValue": { required: true },
2417
- "modelModifiers": {}
2418
- }),
2419
- emits: ["update:modelValue"],
2420
- setup(__props) {
2421
- /** The selected content type with two-way binding */
2422
- const selectedContentType = useModel(__props, "modelValue");
2423
- const contentTypes = computed(() => Object.keys(__props.content ?? {}));
2424
- const selectedOption = computed({
2425
- get: () => options.value.find((option) => option.id === selectedContentType.value),
2426
- set: (option) => {
2427
- if (option) selectedContentType.value = option.id;
2428
- }
2429
- });
2430
- const options = computed(() => {
2431
- return contentTypes.value.map((type) => ({
2432
- id: type,
2433
- label: type
2434
- }));
2435
- });
2436
- const contentTypeSelect = cva({
2437
- base: "font-normal text-c-2 bg-b-1 py-1 flex items-center gap-1 rounded-full text-xs leading-none border",
2438
- variants: { dropdown: {
2439
- true: "hover:text-c-1 pl-2 pr-1.5 font-medium cursor-pointer",
2440
- false: "px-2"
2441
- } }
2442
- });
2443
- return (_ctx, _cache) => {
2444
- return contentTypes.value.length > 1 ? (openBlock(), createBlock(unref(ScalarListbox), {
2445
- key: 0,
2446
- modelValue: selectedOption.value,
2447
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedOption.value = $event),
2448
- options: options.value,
2449
- placement: "bottom-end",
2450
- teleport: "",
2451
- onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"]))
2452
- }, {
2453
- default: withCtx(({ open }) => [createVNode(unref(ScalarButton), mergeProps({
2454
- class: ["h-fit", unref(contentTypeSelect)({ dropdown: true })],
2455
- variant: "ghost"
2456
- }, _ctx.$attrs, { onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])) }), {
2457
- default: withCtx(() => [
2458
- createVNode(ScreenReader_default, null, {
2459
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Selected Content Type:", -1)])]),
2460
- _: 1
2461
- }),
2462
- createElementVNode("span", null, toDisplayString(selectedContentType.value), 1),
2463
- createVNode(unref(ScalarIconCaretDown), {
2464
- class: normalizeClass(["size-2.75 transition-transform duration-100", { "rotate-180": open }]),
2465
- weight: "bold"
2466
- }, null, 8, ["class"])
2467
- ]),
2468
- _: 2
2469
- }, 1040, ["class"])]),
2470
- _: 1
2471
- }, 8, ["modelValue", "options"])) : (openBlock(), createElementBlock("div", mergeProps({
2472
- key: 1,
2473
- class: ["selected-content-type", unref(contentTypeSelect)({ dropdown: false })]
2474
- }, _ctx.$attrs, { tabindex: "0" }), [createElementVNode("span", null, toDisplayString(selectedContentType.value), 1)], 16));
2475
- };
2476
- }
2477
- });
2478
- //#endregion
2479
- //#region src/features/Operation/components/Header.vue
2480
- var Header_default = /* @__PURE__ */ defineComponent({
2481
- __name: "Header",
2482
- props: {
2483
- header: {},
2484
- name: {},
2485
- breadcrumb: {},
2486
- eventBus: {},
2487
- orderSchemaPropertiesBy: {},
2488
- orderRequiredPropertiesFirst: { type: Boolean }
2489
- },
2490
- setup(__props) {
2491
- return (_ctx, _cache) => {
2492
- return "schema" in __props.header && __props.header.schema ? (openBlock(), createBlock(SchemaProperty_default, {
2493
- key: 0,
2494
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "headers"] : void 0,
2495
- description: __props.header.description,
2496
- eventBus: __props.eventBus,
2497
- name: __props.name,
2498
- options: {
2499
- orderRequiredPropertiesFirst: __props.orderRequiredPropertiesFirst,
2500
- orderSchemaPropertiesBy: __props.orderSchemaPropertiesBy
2501
- },
2502
- schema: unref(getResolvedRef)(__props.header.schema)
2503
- }, null, 8, [
2504
- "breadcrumb",
2505
- "description",
2506
- "eventBus",
2507
- "name",
2508
- "options",
2509
- "schema"
2510
- ])) : createCommentVNode("", true);
2511
- };
2512
- }
2513
- });
2514
- //#endregion
2515
- //#region src/features/Operation/components/Headers.vue
2516
- var Headers_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2517
- __name: "Headers",
2518
- props: {
2519
- headers: {},
2520
- breadcrumb: {},
2521
- eventBus: {},
2522
- orderRequiredPropertiesFirst: { type: Boolean },
2523
- orderSchemaPropertiesBy: {}
2524
- },
2525
- setup(__props) {
2526
- return (_ctx, _cache) => {
2527
- return openBlock(), createBlock(unref(Disclosure), null, {
2528
- default: withCtx(({ open }) => [createElementVNode("div", { class: normalizeClass(["headers-card headers-card--compact", [{ "headers-card--open": open }]]) }, [createElementVNode("div", { class: normalizeClass(["headers-properties", { "headers-properties-open": open }]) }, [createVNode(unref(DisclosureButton), {
2529
- class: "headers-card-title headers-card-title--compact",
2530
- style: { top: `calc(var(--refs-viewport-offset)))` }
2531
- }, {
2532
- default: withCtx(() => [createVNode(unref(ScalarIcon), {
2533
- class: normalizeClass(["headers-card-title-icon", { "headers-card-title-icon--open": open }]),
2534
- icon: "Add",
2535
- size: "sm"
2536
- }, null, 8, ["class"]), open ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" Hide Headers ")], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" Show Headers ")], 64))]),
2537
- _: 2
2538
- }, 1024), createVNode(unref(DisclosurePanel), null, {
2539
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.headers, (header, key) => {
2540
- return openBlock(), createBlock(Header_default, {
2541
- key,
2542
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "headers"] : void 0,
2543
- eventBus: __props.eventBus,
2544
- header: unref(getResolvedRef)(header),
2545
- name: key,
2546
- orderRequiredPropertiesFirst: __props.orderRequiredPropertiesFirst,
2547
- orderSchemaPropertiesBy: __props.orderSchemaPropertiesBy
2548
- }, null, 8, [
2549
- "breadcrumb",
2550
- "eventBus",
2551
- "header",
2552
- "name",
2553
- "orderRequiredPropertiesFirst",
2554
- "orderSchemaPropertiesBy"
2555
- ]);
2556
- }), 128))]),
2557
- _: 1
2558
- })], 2)], 2)]),
2559
- _: 1
2560
- });
2561
- };
2562
- }
2563
- }), [["__scopeId", "data-v-ab19704d"]]);
2564
- //#endregion
2565
- //#region src/features/Operation/components/ParameterListItem.vue?vue&type=script&setup=true&lang.ts
2566
- var _hoisted_1$9 = { class: "parameter-item group/parameter-item" };
2567
- var _hoisted_2$6 = { class: "parameter-item-name min-w-0" };
2568
- var _hoisted_3$5 = {
2569
- key: 1,
2570
- class: "flex-1"
2571
- };
2572
- //#endregion
2573
- //#region src/features/Operation/components/ParameterListItem.vue
2574
- var ParameterListItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2575
- __name: "ParameterListItem",
2576
- props: {
2577
- parameter: {},
2578
- name: {},
2579
- breadcrumb: {},
2580
- eventBus: {},
2581
- collapsableItems: { type: Boolean },
2582
- options: {}
2583
- },
2584
- setup(__props) {
2585
- /** Responses and params may both have a schema */
2586
- const schema = computed(() => "schema" in __props.parameter && __props.parameter.schema ? getResolvedRef(__props.parameter.schema) : null);
2587
- /** Response and params may both have content */
2588
- const content = computed(() => "content" in __props.parameter && __props.parameter.content ? __props.parameter.content : null);
2589
- const selectedContentType = ref(Object.keys(content.value || {})[0] ?? "");
2590
- /** Response headers */
2591
- const headers = computed(() => "headers" in __props.parameter && __props.parameter.headers ? __props.parameter.headers : null);
2592
- /** Raw schema (possibly with $ref) for the selected content type or param. */
2593
- const baseSchema = computed(() => content.value ? content.value?.[selectedContentType.value]?.schema : "schema" in __props.parameter && __props.parameter.schema ? __props.parameter.schema : null);
2594
- /** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */
2595
- const schemaModelName = computed(() => {
2596
- const raw = baseSchema.value;
2597
- if (!raw) return null;
2598
- if ("$ref" in raw) return getRefName(raw.$ref);
2599
- return null;
2600
- });
2601
- /** Computed value from the combined schema param and content param */
2602
- const value = computed(() => {
2603
- const base = baseSchema.value;
2604
- const resolvedBase = content.value ? getResolvedRef(base) : schema.value;
2605
- const deprecated = "deprecated" in __props.parameter ? __props.parameter.deprecated : schema.value?.deprecated;
2606
- const paramExamples = "examples" in __props.parameter ? __props.parameter.examples : {};
2607
- const recordExamples = Object.values({
2608
- ...paramExamples,
2609
- ...content.value?.[selectedContentType.value]?.examples
2610
- });
2611
- const arrayExamples = schema.value?.examples ?? (recordExamples.length === 0 && "example" in __props.parameter ? [__props.parameter.example] : []);
2612
- /** Combine param examples with content ones */
2613
- const examples = [...recordExamples, ...arrayExamples];
2614
- return {
2615
- ...resolvedBase,
2616
- deprecated,
2617
- examples
2618
- };
2619
- });
2620
- /**
2621
- * Determines whether this parameter item should be rendered as a collapsible disclosure.
2622
- * Only collapses when collapsableItems is enabled and the parameter has additional
2623
- * content to display (content types, headers, or schema details).
2624
- */
2625
- const shouldCollapse = computed(() => Boolean(__props.collapsableItems && (content.value || headers.value || schema.value)));
2626
- return (_ctx, _cache) => {
2627
- return openBlock(), createElementBlock("li", _hoisted_1$9, [createVNode(unref(Disclosure), null, {
2628
- default: withCtx(({ open }) => [
2629
- shouldCollapse.value ? (openBlock(), createBlock(unref(DisclosureButton), {
2630
- key: 0,
2631
- class: normalizeClass(["parameter-item-trigger", { "parameter-item-trigger-open": open }])
2632
- }, {
2633
- default: withCtx(() => [createElementVNode("div", _hoisted_2$6, [createVNode(unref(ScalarIconCaretRight), {
2634
- class: normalizeClass(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": open }]),
2635
- weight: "bold"
2636
- }, null, 8, ["class"]), createElementVNode("div", null, [createVNode(unref(ScalarWrappingText), {
2637
- preset: "property",
2638
- text: __props.name
2639
- }, null, 8, ["text"])])]), !open && __props.parameter.description ? (openBlock(), createBlock(unref(ScalarMarkdownSummary), {
2640
- key: 0,
2641
- class: "parameter-item-description-summary min-w-0 flex-1",
2642
- controlled: "",
2643
- value: __props.parameter.description
2644
- }, null, 8, ["value"])) : (openBlock(), createElementBlock("div", _hoisted_3$5))]),
2645
- _: 2
2646
- }, 1032, ["class"])) : createCommentVNode("", true),
2647
- shouldCollapse.value && content.value ? (openBlock(), createElementBlock("div", {
2648
- key: 1,
2649
- class: normalizeClass(["absolute top-[calc(10px+0.5lh)] right-0 z-0 flex -translate-y-1/2 items-center text-base", { "opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100": !open }])
2650
- }, [_cache[1] || (_cache[1] = createElementVNode("div", { class: "from-b-1 absolute inset-y-0 -left-6 -z-1 w-8 bg-linear-to-l from-40% to-transparent" }, null, -1)), createVNode(ContentTypeSelect_default, {
2651
- modelValue: selectedContentType.value,
2652
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedContentType.value = $event),
2653
- content: content.value
2654
- }, null, 8, ["modelValue", "content"])], 2)) : createCommentVNode("", true),
2655
- createVNode(unref(DisclosurePanel), {
2656
- class: "parameter-item-container parameter-item-container-markdown",
2657
- static: !shouldCollapse.value
2658
- }, {
2659
- default: withCtx(() => [
2660
- shouldCollapse.value && __props.parameter.description ? (openBlock(), createBlock(unref(ScalarMarkdown), {
2661
- key: 0,
2662
- class: "parameter-item-description",
2663
- value: __props.parameter.description
2664
- }, null, 8, ["value"])) : createCommentVNode("", true),
2665
- headers.value ? (openBlock(), createBlock(Headers_default, {
2666
- key: 1,
2667
- breadcrumb: __props.breadcrumb,
2668
- eventBus: __props.eventBus,
2669
- headers: headers.value,
2670
- orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
2671
- orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy
2672
- }, null, 8, [
2673
- "breadcrumb",
2674
- "eventBus",
2675
- "headers",
2676
- "orderRequiredPropertiesFirst",
2677
- "orderSchemaPropertiesBy"
2678
- ])) : createCommentVNode("", true),
2679
- createVNode(SchemaProperty_default, {
2680
- is: "div",
2681
- breadcrumb: __props.breadcrumb,
2682
- compact: "",
2683
- description: shouldCollapse.value ? "" : __props.parameter.description,
2684
- eventBus: __props.eventBus,
2685
- hideWriteOnly: true,
2686
- modelName: schemaModelName.value,
2687
- name: shouldCollapse.value ? "" : __props.name,
2688
- noncollapsible: true,
2689
- options: {
2690
- hideWriteOnly: true,
2691
- orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
2692
- orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy
2693
- },
2694
- required: "required" in __props.parameter && __props.parameter.required,
2695
- schema: value.value
2696
- }, null, 8, [
2697
- "breadcrumb",
2698
- "description",
2699
- "eventBus",
2700
- "modelName",
2701
- "name",
2702
- "options",
2703
- "required",
2704
- "schema"
2705
- ])
2706
- ]),
2707
- _: 1
2708
- }, 8, ["static"])
2709
- ]),
2710
- _: 1
2711
- })]);
2712
- };
2713
- }
2714
- }), [["__scopeId", "data-v-f6277c9a"]]);
2715
- //#endregion
2716
- //#region src/features/Operation/components/ParameterList.vue?vue&type=script&setup=true&lang.ts
2717
- var _hoisted_1$8 = {
2718
- key: 0,
2719
- class: "mt-6"
2720
- };
2721
- var _hoisted_2$5 = ["id"];
2722
- var _hoisted_3$4 = ["aria-labelledby"];
2723
- //#endregion
2724
- //#region src/features/Operation/components/ParameterList.vue
2725
- var ParameterList_default = /* @__PURE__ */ defineComponent({
2726
- __name: "ParameterList",
2727
- props: {
2728
- parameters: {},
2729
- breadcrumb: {},
2730
- eventBus: {},
2731
- collapsableItems: { type: Boolean },
2732
- options: {}
2733
- },
2734
- setup(__props) {
2735
- /** Accessible id for the heading */
2736
- const id = useId();
2737
- return (_ctx, _cache) => {
2738
- return __props.parameters?.length ? (openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", {
2739
- id: unref(id),
2740
- class: "text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium"
2741
- }, [renderSlot(_ctx.$slots, "title")], 8, _hoisted_2$5), createElementVNode("ul", {
2742
- "aria-labelledby": unref(id),
2743
- class: "mb-3 list-none p-0 text-sm"
2744
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.parameters, (item) => {
2745
- return openBlock(), createBlock(ParameterListItem_default, {
2746
- key: item.name,
2747
- breadcrumb: __props.breadcrumb,
2748
- collapsableItems: __props.collapsableItems,
2749
- eventBus: __props.eventBus,
2750
- name: item.name,
2751
- options: __props.options,
2752
- parameter: item
2753
- }, null, 8, [
2754
- "breadcrumb",
2755
- "collapsableItems",
2756
- "eventBus",
2757
- "name",
2758
- "options",
2759
- "parameter"
2760
- ]);
2761
- }), 128))], 8, _hoisted_3$4)])) : createCommentVNode("", true);
2762
- };
2763
- }
2764
- });
2765
- //#endregion
2766
- //#region src/features/Operation/components/RequestBody.vue?vue&type=script&setup=true&lang.ts
2767
- var _hoisted_1$7 = {
2768
- key: 0,
2769
- "aria-label": "Request Body",
2770
- class: "request-body",
2771
- role: "group"
2772
- };
2773
- var _hoisted_2$4 = { class: "request-body-header" };
2774
- var _hoisted_3$3 = { class: "request-body-title" };
2775
- var _hoisted_4$3 = { class: "flex items-center gap-2" };
2776
- var _hoisted_5$3 = {
2777
- key: 0,
2778
- class: "request-body-required"
2779
- };
2780
- var _hoisted_6$2 = {
2781
- key: 0,
2782
- class: "request-body-description"
2783
- };
2784
- var _hoisted_7$1 = {
2785
- key: 0,
2786
- class: "request-body-schema"
2787
- };
2788
- var _hoisted_8$1 = {
2789
- key: 1,
2790
- class: "request-body-schema"
2791
- };
2792
- var MAX_VISIBLE_PROPERTIES = 12;
2793
- //#endregion
2794
- //#region src/features/Operation/components/RequestBody.vue
2795
- var RequestBody_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2796
- __name: "RequestBody",
2797
- props: {
2798
- breadcrumb: {},
2799
- requestBody: {},
2800
- eventBus: {},
2801
- options: {}
2802
- },
2803
- setup(__props) {
2804
- /**
2805
- * The maximum number of properties to show in the request body schema.
2806
- */
2807
- const availableContentTypes = computed(() => Object.keys(__props.requestBody?.content ?? {}));
2808
- const selectedContentType = ref("application/json");
2809
- if (__props.requestBody?.content) {
2810
- if (availableContentTypes.value[0]) selectedContentType.value = availableContentTypes.value[0];
2811
- }
2812
- const schema = computed(() => getResolvedRef(__props.requestBody?.content?.[selectedContentType.value]?.schema));
2813
- /**
2814
- * Splits schema properties into visible and collapsed sections when there are more than 12 properties.
2815
- * Returns null for schemas with fewer properties or non-object schemas.
2816
- */
2817
- const partitionedSchema = computed(() => {
2818
- if (!schema.value || !isTypeObject(schema.value)) return null;
2819
- const sortedNames = sortPropertyNames(schema.value, schema.value.discriminator, {
2820
- hideReadOnly: true,
2821
- orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy,
2822
- orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst
2823
- });
2824
- if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) return null;
2825
- const { properties, ...schemaMetadata } = schema.value;
2826
- if (!properties) return null;
2827
- return {
2828
- visibleProperties: {
2829
- ...schemaMetadata,
2830
- properties: reduceNamesToObject(sortedNames.slice(0, MAX_VISIBLE_PROPERTIES), properties)
2831
- },
2832
- collapsedProperties: {
2833
- ...schemaMetadata,
2834
- properties: reduceNamesToObject(sortedNames.slice(MAX_VISIBLE_PROPERTIES), properties)
2835
- }
2836
- };
2837
- });
2838
- /**
2839
- * We don't want to render the request body if its completely empty
2840
- * @example
2841
- * {
2842
- * "content": {},
2843
- * }
2844
- */
2845
- const shouldRenderRequestBody = computed(() => Object.keys(__props.requestBody?.content ?? {}).length > 0 || __props.requestBody?.description || __props.requestBody?.required);
2846
- return (_ctx, _cache) => {
2847
- return __props.requestBody && shouldRenderRequestBody.value ? (openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("div", _hoisted_2$4, [
2848
- createElementVNode("div", _hoisted_3$3, [renderSlot(_ctx.$slots, "title", {}, void 0, true)]),
2849
- createElementVNode("div", _hoisted_4$3, [__props.requestBody.required ? (openBlock(), createElementBlock("div", _hoisted_5$3, " required ")) : createCommentVNode("", true), createVNode(ContentTypeSelect_default, {
2850
- modelValue: selectedContentType.value,
2851
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedContentType.value = $event),
2852
- content: __props.requestBody.content
2853
- }, null, 8, ["modelValue", "content"])]),
2854
- __props.requestBody.description ? (openBlock(), createElementBlock("div", _hoisted_6$2, [createVNode(unref(ScalarMarkdown), { value: __props.requestBody.description }, null, 8, ["value"])])) : createCommentVNode("", true)
2855
- ]), partitionedSchema.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [createVNode(unref(Schema_default), {
2856
- breadcrumb: __props.breadcrumb,
2857
- compact: "",
2858
- eventBus: __props.eventBus,
2859
- name: "Request Body",
2860
- noncollapsible: "",
2861
- options: {
2862
- hideReadOnly: true,
2863
- orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
2864
- orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy
2865
- },
2866
- schema: partitionedSchema.value.visibleProperties
2867
- }, null, 8, [
2868
- "breadcrumb",
2869
- "eventBus",
2870
- "options",
2871
- "schema"
2872
- ]), createVNode(unref(Schema_default), {
2873
- additionalProperties: "",
2874
- breadcrumb: __props.breadcrumb,
2875
- compact: "",
2876
- eventBus: __props.eventBus,
2877
- name: "Request Body",
2878
- options: {
2879
- hideReadOnly: true,
2880
- orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
2881
- orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy
2882
- },
2883
- schema: partitionedSchema.value.collapsedProperties
2884
- }, null, 8, [
2885
- "breadcrumb",
2886
- "eventBus",
2887
- "options",
2888
- "schema"
2889
- ])])) : schema.value ? (openBlock(), createElementBlock("div", _hoisted_8$1, [createVNode(unref(Schema_default), {
2890
- breadcrumb: __props.breadcrumb,
2891
- compact: "",
2892
- eventBus: __props.eventBus,
2893
- hideReadOnly: true,
2894
- name: "Request Body",
2895
- noncollapsible: "",
2896
- options: {
2897
- hideReadOnly: true,
2898
- orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
2899
- orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy
2900
- },
2901
- schema: schema.value
2902
- }, null, 8, [
2903
- "breadcrumb",
2904
- "eventBus",
2905
- "options",
2906
- "schema"
2907
- ])])) : createCommentVNode("", true)])) : createCommentVNode("", true);
2908
- };
2909
- }
2910
- }), [["__scopeId", "data-v-17941e59"]]);
2911
- //#endregion
2912
- //#region src/features/Operation/components/OperationParameters.vue
2913
- var OperationParameters_default = /* @__PURE__ */ defineComponent({
2914
- __name: "OperationParameters",
2915
- props: {
2916
- breadcrumb: {},
2917
- parameters: { default: () => [] },
2918
- requestBody: {},
2919
- eventBus: {},
2920
- options: {}
2921
- },
2922
- setup(__props) {
2923
- /** Use a single loop to reduce parameters by type(in) */
2924
- const splitParameters = computed(() => (__props.parameters ?? []).reduce((acc, p) => {
2925
- const parameter = getResolvedRef(p);
2926
- if (!shouldIgnoreEntity(parameter)) acc[parameter.in].push(parameter);
2927
- return acc;
2928
- }, {
2929
- cookie: [],
2930
- header: [],
2931
- path: [],
2932
- query: []
2933
- }));
2934
- return (_ctx, _cache) => {
2935
- return openBlock(), createElementBlock(Fragment, null, [
2936
- createVNode(ParameterList_default, {
2937
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "path"] : void 0,
2938
- eventBus: __props.eventBus,
2939
- options: __props.options,
2940
- parameters: splitParameters.value["path"]
2941
- }, {
2942
- title: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Path Parameters", -1)])]),
2943
- _: 1
2944
- }, 8, [
2945
- "breadcrumb",
2946
- "eventBus",
2947
- "options",
2948
- "parameters"
2949
- ]),
2950
- createVNode(ParameterList_default, {
2951
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "query"] : void 0,
2952
- eventBus: __props.eventBus,
2953
- options: __props.options,
2954
- parameters: splitParameters.value["query"]
2955
- }, {
2956
- title: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Query Parameters", -1)])]),
2957
- _: 1
2958
- }, 8, [
2959
- "breadcrumb",
2960
- "eventBus",
2961
- "options",
2962
- "parameters"
2963
- ]),
2964
- createVNode(ParameterList_default, {
2965
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "headers"] : void 0,
2966
- eventBus: __props.eventBus,
2967
- options: __props.options,
2968
- parameters: splitParameters.value["header"]
2969
- }, {
2970
- title: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode("Headers", -1)])]),
2971
- _: 1
2972
- }, 8, [
2973
- "breadcrumb",
2974
- "eventBus",
2975
- "options",
2976
- "parameters"
2977
- ]),
2978
- createVNode(ParameterList_default, {
2979
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "cookies"] : void 0,
2980
- eventBus: __props.eventBus,
2981
- options: __props.options,
2982
- parameters: splitParameters.value["cookie"]
2983
- }, {
2984
- title: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Cookies", -1)])]),
2985
- _: 1
2986
- }, 8, [
2987
- "breadcrumb",
2988
- "eventBus",
2989
- "options",
2990
- "parameters"
2991
- ]),
2992
- __props.requestBody ? (openBlock(), createBlock(RequestBody_default, {
2993
- key: 0,
2994
- breadcrumb: __props.breadcrumb ? [...__props.breadcrumb, "body"] : void 0,
2995
- eventBus: __props.eventBus,
2996
- options: __props.options,
2997
- requestBody: __props.requestBody
2998
- }, {
2999
- title: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("Body", -1)])]),
3000
- _: 1
3001
- }, 8, [
3002
- "breadcrumb",
3003
- "eventBus",
3004
- "options",
3005
- "requestBody"
3006
- ])) : createCommentVNode("", true)
3007
- ], 64);
3008
- };
3009
- }
3010
- });
3011
- //#endregion
3012
- //#region src/features/Operation/components/OperationResponses.vue?vue&type=script&setup=true&lang.ts
3013
- var _hoisted_1$6 = {
3014
- key: 0,
3015
- class: "mt-6"
3016
- };
3017
- var _hoisted_2$3 = {
3018
- "aria-label": "Responses",
3019
- class: "mb-3 list-none p-0 text-sm"
3020
- };
3021
- //#endregion
3022
- //#region src/features/Operation/components/OperationResponses.vue
3023
- var OperationResponses_default = /* @__PURE__ */ defineComponent({
3024
- __name: "OperationResponses",
3025
- props: {
3026
- responses: {},
3027
- breadcrumb: {},
3028
- collapsableItems: { type: Boolean },
3029
- eventBus: {},
3030
- options: {}
3031
- },
3032
- setup(__props) {
3033
- return (_ctx, _cache) => {
3034
- return Object.keys(__props.responses ?? {}).length ? (openBlock(), createElementBlock("div", _hoisted_1$6, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "text-c-1 mt-3 mb-3 leading-[1.45] font-medium" }, "Responses", -1)), createElementVNode("ul", _hoisted_2$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.responses, (response, status) => {
3035
- return openBlock(), createBlock(ParameterListItem_default, {
3036
- key: status,
3037
- breadcrumb: __props.breadcrumb,
3038
- collapsableItems: __props.collapsableItems,
3039
- eventBus: __props.eventBus,
3040
- name: status,
3041
- options: __props.options,
3042
- parameter: unref(getResolvedRef)(response)
3043
- }, null, 8, [
3044
- "breadcrumb",
3045
- "collapsableItems",
3046
- "eventBus",
3047
- "name",
3048
- "options",
3049
- "parameter"
3050
- ]);
3051
- }), 128))])])) : createCommentVNode("", true);
3052
- };
3053
- }
3054
- });
3055
- //#endregion
3056
- //#region src/features/Operation/components/callbacks/Callback.vue?vue&type=script&setup=true&lang.ts
3057
- var _hoisted_1$5 = { class: "group callback-list-item" };
3058
- var _hoisted_2$2 = { class: "font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-2.5 text-sm group-open:flex-wrap" };
3059
- var _hoisted_3$2 = { class: "text-c-1 min-w-0 flex-1 truncate text-sm leading-5 font-bold group-open:whitespace-normal" };
3060
- var _hoisted_4$2 = { class: "text-c-2 font-normal" };
3061
- var _hoisted_5$2 = { class: "callback-operation-container flex flex-col gap-2" };
3062
- //#endregion
3063
- //#region src/features/Operation/components/callbacks/Callback.vue
3064
- var Callback_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
3065
- __name: "Callback",
3066
- props: {
3067
- callback: {},
3068
- method: {},
3069
- name: {},
3070
- url: {},
3071
- eventBus: {},
3072
- options: {}
3073
- },
3074
- setup(__props) {
3075
- return (_ctx, _cache) => {
3076
- return openBlock(), createElementBlock("details", _hoisted_1$5, [createElementVNode("summary", _hoisted_2$2, [
3077
- createVNode(unref(ScalarIconCaretRight), {
3078
- class: "callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-3 transition-transform duration-100 group-open:rotate-90",
3079
- weight: "bold"
3080
- }),
3081
- createVNode(unref(HttpMethod_default), {
3082
- as: "span",
3083
- class: "request-method py-0.75 font-bold",
3084
- method: __props.method
3085
- }, null, 8, ["method"]),
3086
- createElementVNode("div", _hoisted_3$2, [createTextVNode(toDisplayString(__props.name) + " ", 1), createElementVNode("span", _hoisted_4$2, toDisplayString(__props.url), 1)])
3087
- ]), createElementVNode("div", _hoisted_5$2, [createVNode(OperationParameters_default, {
3088
- eventBus: __props.eventBus,
3089
- options: __props.options,
3090
- parameters: __props.callback.parameters?.map((param) => unref(getResolvedRef)(param)) ?? [],
3091
- requestBody: unref(getResolvedRef)(__props.callback.requestBody)
3092
- }, null, 8, [
3093
- "eventBus",
3094
- "options",
3095
- "parameters",
3096
- "requestBody"
3097
- ]), createVNode(OperationResponses_default, {
3098
- collapsableItems: false,
3099
- eventBus: __props.eventBus,
3100
- options: __props.options,
3101
- responses: __props.callback.responses
3102
- }, null, 8, [
3103
- "eventBus",
3104
- "options",
3105
- "responses"
3106
- ])])]);
3107
- };
3108
- }
3109
- }), [["__scopeId", "data-v-df994c31"]]);
3110
- //#endregion
3111
- //#region src/features/Operation/components/callbacks/Callbacks.vue?vue&type=script&setup=true&lang.ts
3112
- var _hoisted_1$4 = {
3113
- "aria-label": "Callbacks",
3114
- class: "callbacks-list gap-3",
3115
- role: "group"
3116
- };
3117
- //#endregion
3118
- //#region src/features/Operation/components/callbacks/Callbacks.vue
3119
- var Callbacks_default = /* @__PURE__ */ defineComponent({
3120
- __name: "Callbacks",
3121
- props: {
3122
- path: {},
3123
- callbacks: {},
3124
- eventBus: {},
3125
- options: {}
3126
- },
3127
- setup(__props) {
3128
- const flattenedCallbacks = computed(() => {
3129
- const _callbacks = [];
3130
- objectEntries(__props.callbacks).forEach(([name, pathItem]) => {
3131
- objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {
3132
- if (typeof methods !== "object" || !methods) return;
3133
- objectEntries(methods).forEach(([callbackMethod, callback]) => {
3134
- if (!isHttpMethod(callbackMethod)) return;
3135
- _callbacks.push({
3136
- name,
3137
- url,
3138
- method: callbackMethod,
3139
- callback
3140
- });
3141
- });
3142
- });
3143
- });
3144
- return _callbacks;
3145
- });
3146
- return (_ctx, _cache) => {
3147
- return openBlock(), createElementBlock("div", _hoisted_1$4, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(flattenedCallbacks.value, ({ callback, method, name, url }) => {
3148
- return openBlock(), createBlock(Callback_default, {
3149
- key: `${name}-${url}-${method}`,
3150
- callback,
3151
- eventBus: __props.eventBus,
3152
- method,
3153
- name,
3154
- options: __props.options,
3155
- path: __props.path,
3156
- url
3157
- }, null, 8, [
3158
- "callback",
3159
- "eventBus",
3160
- "method",
3161
- "name",
3162
- "options",
3163
- "path",
3164
- "url"
3165
- ]);
3166
- }), 128))]);
3167
- };
3168
- }
3169
- });
3170
- //#endregion
3171
- //#region src/features/test-request-button/TestRequestButton.vue?vue&type=script&setup=true&lang.ts
3172
- var _hoisted_1$3 = ["method"];
3173
- //#endregion
3174
- //#region src/features/test-request-button/TestRequestButton.vue
3175
- var TestRequestButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
3176
- __name: "TestRequestButton",
3177
- props: {
3178
- id: {},
3179
- method: {},
3180
- path: {},
3181
- eventBus: {},
3182
- exampleName: {}
3183
- },
3184
- setup(__props) {
3185
- /** Route via ID and optionally with example name */
3186
- const handleClick = () => {
3187
- const payload = {
3188
- id: __props.id,
3189
- ...__props.exampleName && { exampleName: __props.exampleName }
3190
- };
3191
- __props.eventBus.emit("ui:open:client-modal", payload);
3192
- };
3193
- return (_ctx, _cache) => {
3194
- return openBlock(), createElementBlock("button", {
3195
- class: "show-api-client-button",
3196
- method: __props.method,
3197
- type: "button",
3198
- onClick: withModifiers(handleClick, ["stop"])
3199
- }, [
3200
- createVNode(unref(ScalarIconPlay), {
3201
- class: "size-3",
3202
- weight: "fill"
3203
- }),
3204
- _cache[0] || (_cache[0] = createElementVNode("span", null, "Test Request", -1)),
3205
- createVNode(ScreenReader_default, null, {
3206
- default: withCtx(() => [createTextVNode("(" + toDisplayString(__props.method) + " " + toDisplayString(__props.path) + ")", 1)]),
3207
- _: 1
3208
- })
3209
- ], 8, _hoisted_1$3);
3210
- };
3211
- }
3212
- }), [["__scopeId", "data-v-342ba62a"]]);
3213
- //#endregion
3214
- //#region src/features/x-badges/XBadges.vue
3215
- var XBadges_default = /* @__PURE__ */ defineComponent({
3216
- __name: "XBadges",
3217
- props: {
3218
- position: {},
3219
- badges: {}
3220
- },
3221
- setup(__props) {
3222
- const filteredBadges = computed(() => {
3223
- if (Array.isArray(__props.badges)) return __props.badges.filter((badge) => badge.position === __props.position || __props.position === "after" && !badge.position);
3224
- return [];
3225
- });
3226
- return (_ctx, _cache) => {
3227
- return filteredBadges.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filteredBadges.value, (badge) => {
3228
- return openBlock(), createBlock(unref(Badge_default), {
3229
- key: badge.name,
3230
- color: badge.color
3231
- }, {
3232
- default: withCtx(() => [createTextVNode(toDisplayString(badge.name), 1)]),
3233
- _: 2
3234
- }, 1032, ["color"]);
3235
- }), 128)) : createCommentVNode("", true);
3236
- };
3237
- }
3238
- });
3239
- //#endregion
3240
- //#region src/features/Operation/layouts/ClassicLayout.vue?vue&type=script&setup=true&lang.ts
3241
- var _hoisted_1$2 = { class: "operation-title" };
3242
- var _hoisted_2$1 = { class: "operation-details" };
3243
- var _hoisted_3$1 = { class: "endpoint-label" };
3244
- var _hoisted_4$1 = { class: "endpoint-label-path" };
3245
- var _hoisted_5$1 = { class: "endpoint-label-name" };
3246
- var _hoisted_6$1 = {
3247
- key: 1,
3248
- class: "font-code text-sm"
3249
- };
3250
- var _hoisted_7 = { class: "endpoint-content" };
3251
- var _hoisted_8 = { class: "operation-details-card" };
3252
- var _hoisted_9 = {
3253
- key: 0,
3254
- class: "operation-details-card-item"
3255
- };
3256
- var _hoisted_10 = { class: "operation-details-card-item" };
3257
- var _hoisted_11 = { class: "operation-details-card-item" };
3258
- var _hoisted_12 = {
3259
- key: 1,
3260
- class: "operation-details-card-item"
3261
- };
3262
- //#endregion
3263
- //#region src/features/Operation/layouts/ClassicLayout.vue
3264
- var ClassicLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
3265
- __name: "ClassicLayout",
3266
- props: {
3267
- id: {},
3268
- method: {},
3269
- options: {},
3270
- path: {},
3271
- clientOptions: {},
3272
- isCollapsed: { type: Boolean },
3273
- isWebhook: { type: Boolean },
3274
- selectedClient: {},
3275
- eventBus: {},
3276
- operation: {},
3277
- selectedServer: {},
3278
- selectedSecuritySchemes: {}
3279
- },
3280
- setup(__props) {
3281
- const operationTitle = computed(() => __props.operation.summary || __props.path || "");
3282
- const operationExtensions = computed(() => getXKeysFromObject(__props.operation));
3283
- /** Track the currently selected example for passing to the modal */
3284
- const selectedExampleKey = ref("");
3285
- const { copyToClipboard } = useClipboard();
3286
- return (_ctx, _cache) => {
3287
- return openBlock(), createBlock(unref(SectionAccordion_default), {
3288
- id: __props.id,
3289
- "aria-label": operationTitle.value,
3290
- class: "reference-endpoint",
3291
- modelValue: !__props.isCollapsed,
3292
- transparent: "",
3293
- "onUpdate:modelValue": _cache[3] || (_cache[3] = (value) => __props.eventBus?.emit("toggle:nav-item", {
3294
- id: __props.id,
3295
- open: value
3296
- }))
3297
- }, createSlots({
3298
- title: withCtx(() => [createElementVNode("div", _hoisted_1$2, [createElementVNode("div", _hoisted_2$1, [createVNode(unref(HttpMethod_default), {
3299
- class: "endpoint-type",
3300
- method: __props.method,
3301
- short: ""
3302
- }, null, 8, ["method"]), createVNode(unref(Anchor_default), {
3303
- class: "endpoint-anchor",
3304
- onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id }))
3305
- }, {
3306
- default: withCtx(() => [createElementVNode("h3", _hoisted_3$1, [
3307
- createElementVNode("div", _hoisted_4$1, [createVNode(OperationPath_default, {
3308
- deprecated: unref(isOperationDeprecated)(__props.operation),
3309
- path: __props.path
3310
- }, null, 8, ["deprecated", "path"])]),
3311
- createElementVNode("div", _hoisted_5$1, toDisplayString(operationTitle.value), 1),
3312
- unref(getOperationStability)(__props.operation) ? (openBlock(), createBlock(unref(Badge_default), {
3313
- key: 0,
3314
- class: normalizeClass(["capitalize", unref(getOperationStabilityColor)(__props.operation)])
3315
- }, {
3316
- default: withCtx(() => [createTextVNode(toDisplayString(unref(getOperationStability)(__props.operation)), 1)]),
3317
- _: 1
3318
- }, 8, ["class"])) : createCommentVNode("", true),
3319
- __props.isWebhook ? (openBlock(), createBlock(unref(Badge_default), {
3320
- key: 1,
3321
- class: "font-code text-green flex w-fit items-center justify-center gap-1"
3322
- }, {
3323
- default: withCtx(() => [createVNode(unref(ScalarIconWebhooksLogo), { weight: "bold" }), _cache[4] || (_cache[4] = createTextVNode("Webhook ", -1))]),
3324
- _: 1
3325
- })) : createCommentVNode("", true),
3326
- createVNode(unref(XBadges_default), {
3327
- badges: __props.operation["x-badges"],
3328
- position: "before"
3329
- }, null, 8, ["badges"])
3330
- ])]),
3331
- _: 1
3332
- })])])]),
3333
- actions: withCtx(({ active }) => [
3334
- createVNode(unref(XBadges_default), {
3335
- badges: __props.operation["x-badges"],
3336
- position: "after"
3337
- }, null, 8, ["badges"]),
3338
- !__props.options.hideTestRequestButton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [active && !__props.isWebhook ? (openBlock(), createBlock(unref(TestRequestButton_default), {
3339
- key: 0,
3340
- id: __props.id,
3341
- eventBus: __props.eventBus,
3342
- exampleName: selectedExampleKey.value,
3343
- method: __props.method,
3344
- path: __props.path
3345
- }, null, 8, [
3346
- "id",
3347
- "eventBus",
3348
- "exampleName",
3349
- "method",
3350
- "path"
3351
- ])) : (openBlock(), createBlock(unref(ScalarIconPlay), {
3352
- key: 1,
3353
- class: "endpoint-try-hint size-4.5"
3354
- }))], 64)) : createCommentVNode("", true),
3355
- __props.options.showOperationId && __props.operation.operationId ? (openBlock(), createElementBlock("span", _hoisted_6$1, toDisplayString(__props.operation.operationId), 1)) : createCommentVNode("", true),
3356
- createVNode(unref(ScalarIconButton), {
3357
- class: "endpoint-copy p-0.5",
3358
- icon: unref(ScalarIconCopy),
3359
- label: "Copy endpoint URL",
3360
- size: "xs",
3361
- variant: "ghost",
3362
- onClick: _cache[1] || (_cache[1] = withModifiers(($event) => unref(copyToClipboard)(__props.path), ["stop"]))
3363
- }, null, 8, ["icon"])
3364
- ]),
3365
- default: withCtx(() => [createElementVNode("div", _hoisted_7, [
3366
- createElementVNode("div", _hoisted_8, [
3367
- Object.keys(operationExtensions.value).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9, [createVNode(SpecificationExtension_default, { value: operationExtensions.value }, null, 8, ["value"])])) : createCommentVNode("", true),
3368
- createElementVNode("div", _hoisted_10, [createVNode(OperationParameters_default, {
3369
- eventBus: __props.eventBus,
3370
- options: __props.options,
3371
- parameters: __props.operation.parameters,
3372
- requestBody: unref(getResolvedRef)(__props.operation.requestBody)
3373
- }, null, 8, [
3374
- "eventBus",
3375
- "options",
3376
- "parameters",
3377
- "requestBody"
3378
- ])]),
3379
- createElementVNode("div", _hoisted_11, [createVNode(OperationResponses_default, {
3380
- eventBus: __props.eventBus,
3381
- options: __props.options,
3382
- responses: __props.operation.responses
3383
- }, null, 8, [
3384
- "eventBus",
3385
- "options",
3386
- "responses"
3387
- ])]),
3388
- __props.operation?.callbacks ? (openBlock(), createElementBlock("div", _hoisted_12, [createVNode(Callbacks_default, {
3389
- callbacks: __props.operation.callbacks,
3390
- eventBus: __props.eventBus,
3391
- options: __props.options,
3392
- path: __props.path
3393
- }, null, 8, [
3394
- "callbacks",
3395
- "eventBus",
3396
- "options",
3397
- "path"
3398
- ])])) : createCommentVNode("", true)
3399
- ]),
3400
- __props.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses_default), {
3401
- key: 0,
3402
- class: "operation-example-card",
3403
- responses: __props.operation.responses
3404
- }, null, 8, ["responses"])) : createCommentVNode("", true),
3405
- createElementVNode("div", null, [__props.operation.externalDocs ? (openBlock(), createBlock(unref(LinkList_default), { key: 0 }, {
3406
- default: withCtx(() => [createVNode(unref(ExternalDocs_default), { value: __props.operation.externalDocs }, null, 8, ["value"])]),
3407
- _: 1
3408
- })) : createCommentVNode("", true), createVNode(unref(ScalarErrorBoundary), null, {
3409
- default: withCtx(() => [createVNode(unref(OperationCodeSample), {
3410
- selectedExample: selectedExampleKey.value,
3411
- "onUpdate:selectedExample": _cache[2] || (_cache[2] = ($event) => selectedExampleKey.value = $event),
3412
- class: "operation-example-card",
3413
- clientOptions: __props.clientOptions,
3414
- eventBus: __props.eventBus,
3415
- fallback: "",
3416
- isWebhook: __props.isWebhook,
3417
- method: __props.method,
3418
- operation: __props.operation,
3419
- path: __props.path,
3420
- securitySchemes: __props.selectedSecuritySchemes,
3421
- selectedClient: __props.selectedClient,
3422
- selectedServer: __props.selectedServer
3423
- }, null, 8, [
3424
- "selectedExample",
3425
- "clientOptions",
3426
- "eventBus",
3427
- "isWebhook",
3428
- "method",
3429
- "operation",
3430
- "path",
3431
- "securitySchemes",
3432
- "selectedClient",
3433
- "selectedServer"
3434
- ])]),
3435
- _: 1
3436
- })])
3437
- ])]),
3438
- _: 2
3439
- }, [__props.operation.description ? {
3440
- name: "description",
3441
- fn: withCtx(() => [createVNode(unref(ScalarMarkdown), {
3442
- anchorPrefix: __props.id,
3443
- "aria-label": "Operation Description",
3444
- role: "group",
3445
- transformType: "heading",
3446
- value: __props.operation.description,
3447
- withAnchors: "",
3448
- withImages: ""
3449
- }, null, 8, ["anchorPrefix", "value"])]),
3450
- key: "0"
3451
- } : void 0]), 1032, [
3452
- "id",
3453
- "aria-label",
3454
- "modelValue"
3455
- ]);
3456
- };
3457
- }
3458
- }), [["__scopeId", "data-v-55addca4"]]);
3459
- //#endregion
3460
- //#region src/features/ask-agent-button/AskAgentButton.vue?vue&type=script&setup=true&lang.ts
3461
- var _hoisted_1$1 = {
3462
- class: "ask-agent-scalar-send",
3463
- type: "submit"
3464
- };
3465
- //#endregion
3466
- //#region src/features/ask-agent-button/AskAgentButton.vue
3467
- var AskAgentButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
3468
- __name: "AskAgentButton",
3469
- setup(__props) {
3470
- const agentContext = useAgentContext();
3471
- const message = ref("");
3472
- const inputRef = ref();
3473
- function handleSubmit() {
3474
- agentContext.value?.openAgent(message.value);
3475
- message.value = "";
3476
- }
3477
- return (_ctx, _cache) => {
3478
- return unref(agentContext)?.agentEnabled.value ? (openBlock(), createElementBlock("form", {
3479
- key: 0,
3480
- class: "agent-button-container",
3481
- onClick: _cache[1] || (_cache[1] = ($event) => inputRef.value?.focus()),
3482
- onSubmit: _cache[2] || (_cache[2] = withModifiers(($event) => handleSubmit(), ["prevent"]))
3483
- }, [
3484
- createVNode(unref(ScalarIconSparkle), {
3485
- class: "size-3 shrink-0",
3486
- weight: "fill"
3487
- }),
3488
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "ask-agent-scalar-input-label" }, "Ask AI Agent", -1)),
3489
- withDirectives(createElementVNode("input", {
3490
- ref_key: "inputRef",
3491
- ref: inputRef,
3492
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => message.value = $event),
3493
- class: normalizeClass(["ask-agent-scalar-input", { "ask-agent-scalar-input-not-empty": message.value.length > 0 }]),
3494
- placeholder: "Ask AI Agent"
3495
- }, null, 2), [[vModelText, message.value]]),
3496
- createElementVNode("button", _hoisted_1$1, [createVNode(unref(ScalarIconArrowUp), {
3497
- class: "size-3",
3498
- weight: "bold"
3499
- })])
3500
- ], 32)) : createCommentVNode("", true);
3501
- };
3502
- }
3503
- }), [["__scopeId", "data-v-78f5377c"]]);
3504
- //#endregion
3505
- //#region src/features/Operation/layouts/ModernLayout.vue?vue&type=script&setup=true&lang.ts
3506
- var _hoisted_1 = { class: "flex flex-row justify-between gap-1" };
3507
- var _hoisted_2 = { class: "flex gap-1" };
3508
- var _hoisted_3 = { class: "flex gap-1" };
3509
- var _hoisted_4 = { class: "operation-details" };
3510
- var _hoisted_5 = { class: "examples" };
3511
- var _hoisted_6 = { class: "flex" };
3512
- //#endregion
3513
- //#region src/features/Operation/layouts/ModernLayout.vue
3514
- var ModernLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
3515
- __name: "ModernLayout",
3516
- props: {
3517
- id: {},
3518
- method: {},
3519
- options: {},
3520
- path: {},
3521
- clientOptions: {},
3522
- isWebhook: { type: Boolean },
3523
- selectedClient: {},
3524
- eventBus: {},
3525
- operation: {},
3526
- selectedServer: {},
3527
- selectedSecuritySchemes: {}
3528
- },
3529
- setup(__props) {
3530
- const operationTitle = computed(() => __props.operation.summary || __props.path || "");
3531
- const labelId = useId();
3532
- const operationExtensions = computed(() => getXKeysFromObject(__props.operation));
3533
- return (_ctx, _cache) => {
3534
- return openBlock(), createBlock(unref(Section_default), {
3535
- id: __props.id,
3536
- "aria-labelledby": unref(labelId),
3537
- label: operationTitle.value,
3538
- tabindex: "-1",
3539
- onIntersecting: _cache[1] || (_cache[1] = () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }))
3540
- }, {
3541
- default: withCtx(() => [createVNode(unref(SectionContent_default), null, {
3542
- default: withCtx(() => [
3543
- createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [
3544
- __props.options?.showOperationId && __props.operation.operationId ? (openBlock(), createBlock(unref(Badge_default), { key: 0 }, {
3545
- default: withCtx(() => [createTextVNode(toDisplayString(__props.operation.operationId), 1)]),
3546
- _: 1
3547
- })) : createCommentVNode("", true),
3548
- unref(getOperationStability)(__props.operation) ? (openBlock(), createBlock(unref(Badge_default), {
3549
- key: 1,
3550
- class: normalizeClass(["capitalize", unref(getOperationStabilityColor)(__props.operation)])
3551
- }, {
3552
- default: withCtx(() => [createTextVNode(toDisplayString(unref(getOperationStability)(__props.operation)), 1)]),
3553
- _: 1
3554
- }, 8, ["class"])) : createCommentVNode("", true),
3555
- __props.isWebhook ? (openBlock(), createBlock(unref(Badge_default), {
3556
- key: 2,
3557
- class: "font-code text-green flex w-fit items-center justify-center gap-1"
3558
- }, {
3559
- default: withCtx(() => [createVNode(unref(ScalarIconWebhooksLogo), { weight: "bold" }), _cache[2] || (_cache[2] = createTextVNode("Webhook ", -1))]),
3560
- _: 1
3561
- })) : createCommentVNode("", true),
3562
- createVNode(unref(XBadges_default), {
3563
- badges: __props.operation["x-badges"],
3564
- position: "before"
3565
- }, null, 8, ["badges"])
3566
- ]), createElementVNode("div", _hoisted_3, [createVNode(unref(XBadges_default), {
3567
- badges: __props.operation["x-badges"],
3568
- position: "after"
3569
- }, null, 8, ["badges"])])]),
3570
- createElementVNode("div", { class: normalizeClass(unref(isOperationDeprecated)(__props.operation) ? "deprecated" : "") }, [createVNode(unref(SectionHeader_default), null, {
3571
- default: withCtx(() => [createVNode(unref(Anchor_default), { onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id })) }, {
3572
- default: withCtx(() => [createVNode(unref(SectionHeaderTag_default), {
3573
- id: unref(labelId),
3574
- level: 3
3575
- }, {
3576
- default: withCtx(() => [createTextVNode(toDisplayString(operationTitle.value), 1)]),
3577
- _: 1
3578
- }, 8, ["id"])]),
3579
- _: 1
3580
- })]),
3581
- _: 1
3582
- })], 2),
3583
- createVNode(unref(SectionColumns_default), null, {
3584
- default: withCtx(() => [createVNode(unref(SectionColumn_default), null, {
3585
- default: withCtx(() => [createElementVNode("div", _hoisted_4, [
3586
- createVNode(SpecificationExtension_default, { value: operationExtensions.value }, null, 8, ["value"]),
3587
- createVNode(unref(ScalarMarkdown), {
3588
- anchorPrefix: __props.id,
3589
- "aria-label": "Operation Description",
3590
- role: "group",
3591
- transformType: "heading",
3592
- value: __props.operation.description,
3593
- withAnchors: "",
3594
- withImages: ""
3595
- }, null, 8, ["anchorPrefix", "value"]),
3596
- createVNode(OperationParameters_default, {
3597
- breadcrumb: [__props.id],
3598
- eventBus: __props.eventBus,
3599
- options: __props.options,
3600
- parameters: __props.operation.parameters,
3601
- requestBody: unref(getResolvedRef)(__props.operation.requestBody)
3602
- }, null, 8, [
3603
- "breadcrumb",
3604
- "eventBus",
3605
- "options",
3606
- "parameters",
3607
- "requestBody"
3608
- ]),
3609
- createVNode(OperationResponses_default, {
3610
- breadcrumb: [__props.id],
3611
- collapsableItems: !__props.options.expandAllResponses,
3612
- eventBus: __props.eventBus,
3613
- options: __props.options,
3614
- responses: __props.operation.responses
3615
- }, null, 8, [
3616
- "breadcrumb",
3617
- "collapsableItems",
3618
- "eventBus",
3619
- "options",
3620
- "responses"
3621
- ]),
3622
- createVNode(unref(ScalarErrorBoundary), null, {
3623
- default: withCtx(() => [__props.operation.callbacks ? (openBlock(), createBlock(Callbacks_default, {
3624
- key: 0,
3625
- callbacks: __props.operation.callbacks,
3626
- class: "mt-6",
3627
- eventBus: __props.eventBus,
3628
- options: __props.options,
3629
- path: __props.path
3630
- }, null, 8, [
3631
- "callbacks",
3632
- "eventBus",
3633
- "options",
3634
- "path"
3635
- ])) : createCommentVNode("", true)]),
3636
- _: 1
3637
- })
3638
- ])]),
3639
- _: 1
3640
- }), createVNode(unref(SectionColumn_default), null, {
3641
- default: withCtx(() => [createElementVNode("div", _hoisted_5, [
3642
- __props.operation.externalDocs ? (openBlock(), createBlock(unref(LinkList_default), { key: 0 }, {
3643
- default: withCtx(() => [createVNode(unref(ExternalDocs_default), { value: __props.operation.externalDocs }, null, 8, ["value"])]),
3644
- _: 1
3645
- })) : createCommentVNode("", true),
3646
- createVNode(unref(ScalarErrorBoundary), null, {
3647
- default: withCtx(() => [createVNode(unref(OperationCodeSample), {
3648
- clientOptions: __props.clientOptions,
3649
- eventBus: __props.eventBus,
3650
- fallback: "",
3651
- isWebhook: __props.isWebhook,
3652
- method: __props.method,
3653
- operation: __props.operation,
3654
- path: __props.path,
3655
- securitySchemes: __props.selectedSecuritySchemes,
3656
- selectedClient: __props.selectedClient,
3657
- selectedServer: __props.selectedServer
3658
- }, createSlots({
3659
- header: withCtx(() => [createVNode(OperationPath_default, {
3660
- class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
3661
- deprecated: __props.operation?.deprecated,
3662
- path: __props.path
3663
- }, null, 8, ["deprecated", "path"])]),
3664
- _: 2
3665
- }, [!__props.isWebhook ? {
3666
- name: "footer",
3667
- fn: withCtx(({ exampleName }) => [createElementVNode("div", _hoisted_6, [createVNode(AskAgentButton_default), !__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(TestRequestButton_default), {
3668
- key: 0,
3669
- id: __props.id,
3670
- eventBus: __props.eventBus,
3671
- exampleName,
3672
- method: __props.method,
3673
- path: __props.path
3674
- }, null, 8, [
3675
- "id",
3676
- "eventBus",
3677
- "exampleName",
3678
- "method",
3679
- "path"
3680
- ])) : createCommentVNode("", true)])]),
3681
- key: "0"
3682
- } : void 0]), 1032, [
3683
- "clientOptions",
3684
- "eventBus",
3685
- "isWebhook",
3686
- "method",
3687
- "operation",
3688
- "path",
3689
- "securitySchemes",
3690
- "selectedClient",
3691
- "selectedServer"
3692
- ])]),
3693
- _: 1
3694
- }),
3695
- createVNode(unref(ScalarErrorBoundary), null, {
3696
- default: withCtx(() => [__props.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses_default), {
3697
- key: 0,
3698
- responses: __props.operation.responses,
3699
- style: { "margin-top": "12px" }
3700
- }, null, 8, ["responses"])) : createCommentVNode("", true)]),
3701
- _: 1
3702
- })
3703
- ])]),
3704
- _: 1
3705
- })]),
3706
- _: 1
3707
- })
3708
- ]),
3709
- _: 1
3710
- })]),
3711
- _: 1
3712
- }, 8, [
3713
- "id",
3714
- "aria-labelledby",
3715
- "label"
3716
- ]);
3717
- };
3718
- }
3719
- }), [["__scopeId", "data-v-3c3c5405"]]);
3720
- //#endregion
3721
- //#region src/features/Operation/Operation.vue
3722
- var Operation_default = /* @__PURE__ */ defineComponent({
3723
- __name: "Operation",
3724
- props: {
3725
- id: {},
3726
- method: {},
3727
- options: {},
3728
- document: {},
3729
- path: {},
3730
- pathValue: {},
3731
- server: {},
3732
- securitySchemes: {},
3733
- clientOptions: {},
3734
- isCollapsed: { type: Boolean },
3735
- isWebhook: { type: Boolean },
3736
- selectedClient: {},
3737
- eventBus: {},
3738
- authStore: {}
3739
- },
3740
- setup(__props) {
3741
- /**
3742
- * Operation from the new workspace store, ensure we are de-reference
3743
- *
3744
- * Also adds in params from the pathItemObject
3745
- */
3746
- const operation = computed(() => {
3747
- const entity = getResolvedRef(__props.pathValue?.[__props.method]);
3748
- if (!entity) return null;
3749
- const parameters = combineParams(__props.pathValue?.parameters, entity.parameters);
3750
- return {
3751
- ...entity,
3752
- parameters
3753
- };
3754
- });
3755
- /**
3756
- * Determine the effective server for the code examples.
3757
- */
3758
- const selectedServer = computed(() => getFirstServer(operation.value?.servers ?? null, __props.pathValue?.servers ?? null, __props.server));
3759
- /** We must ensure the selected security schemes are required on this operation */
3760
- const selectedSecuritySchemes = computed(() => filterSelectedSecurity(__props.document, operation.value, __props.authStore.getAuthSelectedSchemas({
3761
- type: "document",
3762
- documentName: __props.document?.["x-scalar-navigation"]?.name ?? ""
3763
- }), __props.authStore.getAuthSelectedSchemas({
3764
- type: "operation",
3765
- documentName: __props.document?.["x-scalar-navigation"]?.name ?? "",
3766
- path: __props.path,
3767
- method: __props.method
3768
- }), __props.securitySchemes));
3769
- return (_ctx, _cache) => {
3770
- return operation.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.options.layout === "classic" ? (openBlock(), createBlock(ClassicLayout_default, {
3771
- key: 0,
3772
- id: __props.id,
3773
- clientOptions: __props.clientOptions,
3774
- eventBus: __props.eventBus,
3775
- isCollapsed: __props.isCollapsed,
3776
- isWebhook: __props.isWebhook,
3777
- method: __props.method,
3778
- operation: operation.value,
3779
- options: __props.options,
3780
- path: __props.path,
3781
- selectedClient: __props.selectedClient,
3782
- selectedSecuritySchemes: selectedSecuritySchemes.value,
3783
- selectedServer: selectedServer.value
3784
- }, null, 8, [
3785
- "id",
3786
- "clientOptions",
3787
- "eventBus",
3788
- "isCollapsed",
3789
- "isWebhook",
3790
- "method",
3791
- "operation",
3792
- "options",
3793
- "path",
3794
- "selectedClient",
3795
- "selectedSecuritySchemes",
3796
- "selectedServer"
3797
- ])) : (openBlock(), createBlock(ModernLayout_default, {
3798
- key: 1,
3799
- id: __props.id,
3800
- clientOptions: __props.clientOptions,
3801
- eventBus: __props.eventBus,
3802
- isWebhook: __props.isWebhook,
3803
- method: __props.method,
3804
- operation: operation.value,
3805
- options: __props.options,
3806
- path: __props.path,
3807
- selectedClient: __props.selectedClient,
3808
- selectedSecuritySchemes: selectedSecuritySchemes.value,
3809
- selectedServer: selectedServer.value
3810
- }, null, 8, [
3811
- "id",
3812
- "clientOptions",
3813
- "eventBus",
3814
- "isWebhook",
3815
- "method",
3816
- "operation",
3817
- "options",
3818
- "path",
3819
- "selectedClient",
3820
- "selectedSecuritySchemes",
3821
- "selectedServer"
3822
- ]))], 64)) : createCommentVNode("", true);
3823
- };
3824
- }
3825
- });
3826
- //#endregion
3827
- export { SchemaHeading_default as a, ScreenReader_default as c, SchemaProperty_default as i, SectionAccordion_default as l, HttpMethod_default as n, getXKeysFromObject as o, Schema_default as r, Anchor_default as s, Operation_default as t };
3828
-
3829
- //# sourceMappingURL=Operation-CvpVIkc3.js.map