fumadocs-openapi 10.8.0 → 10.8.2

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 (125) hide show
  1. package/css/generated/shared.css +1 -0
  2. package/dist/generate-file.d.ts +2 -0
  3. package/dist/generate-file.js +2 -2
  4. package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/general/create-limiter.js +1 -1
  5. package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/object/is-object.js +1 -1
  6. package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +1 -1
  7. package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/queue/queue.js +1 -1
  8. package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/string/generate-hash.js +1 -1
  9. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/bundle.js +13 -2
  10. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +2 -2
  11. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +1 -0
  12. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +1 -1
  13. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +17 -3
  14. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +1 -1
  15. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +1 -1
  16. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +1 -1
  17. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +1 -1
  18. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +1 -1
  19. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +1 -1
  20. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +1 -1
  21. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +2 -2
  22. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +1 -1
  23. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/normalize.js +3 -3
  24. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +1 -1
  25. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +2 -2
  26. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +1 -1
  27. package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +1 -1
  28. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +1 -1
  29. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +1 -1
  30. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +1 -1
  31. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +1 -1
  32. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +1 -1
  33. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
  34. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-doc.js +1 -1
  35. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-node.js +1 -1
  36. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-scalar.js +1 -1
  37. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/composer.js +1 -1
  38. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-map.js +1 -1
  39. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +1 -1
  40. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
  41. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-end.js +1 -1
  42. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +1 -1
  43. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -8
  44. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
  45. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-contains-newline.js +1 -1
  46. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -1
  47. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +1 -1
  48. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-map-includes.js +1 -1
  49. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/Document.js +1 -1
  50. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/anchors.js +6 -1
  51. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/applyReviver.js +1 -1
  52. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/createNode.js +1 -1
  53. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/directives.js +1 -1
  54. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/errors.js +1 -1
  55. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/log.js +1 -1
  56. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Alias.js +2 -1
  57. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Collection.js +1 -1
  58. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Node.js +1 -1
  59. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Pair.js +1 -1
  60. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Scalar.js +1 -1
  61. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
  62. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +1 -1
  63. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -1
  64. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/identity.js +1 -1
  65. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/toJS.js +1 -1
  66. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst-visit.js +1 -1
  67. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/lexer.js +1 -1
  68. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/line-counter.js +1 -1
  69. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/parser.js +1 -1
  70. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/public-api.js +1 -1
  71. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/Schema.js +1 -1
  72. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/map.js +1 -1
  73. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/null.js +1 -1
  74. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/seq.js +1 -1
  75. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/string.js +1 -1
  76. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/bool.js +1 -1
  77. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/float.js +1 -1
  78. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/int.js +1 -1
  79. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/schema.js +1 -1
  80. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
  81. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/tags.js +1 -1
  82. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +9 -1
  83. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +1 -1
  84. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +1 -1
  85. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +1 -1
  86. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +9 -6
  87. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +1 -1
  88. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
  89. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +1 -1
  90. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +1 -1
  91. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
  92. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +1 -1
  93. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringify.js +1 -1
  94. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +1 -1
  95. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyComment.js +1 -1
  96. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +1 -1
  97. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -2
  98. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
  99. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyString.js +1 -1
  100. package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/visit.js +1 -1
  101. package/dist/playground/client.js +3 -3
  102. package/dist/playground/components/inputs.js +2 -2
  103. package/dist/playground/components/oauth-dialog.js +1 -1
  104. package/dist/playground/components/result-display.js +2 -2
  105. package/dist/playground/components/server-select.js +1 -1
  106. package/dist/playground/schema.js +1 -1
  107. package/dist/ui/base.js +1 -1
  108. package/dist/ui/components/dialog.js +1 -1
  109. package/dist/ui/create-client.js +1 -1
  110. package/dist/ui/operation/client.js +1 -1
  111. package/dist/ui/operation/index.js +2 -2
  112. package/dist/ui/operation/request-tabs.js +1 -1
  113. package/dist/ui/operation/usage-tabs/client.js +1 -1
  114. package/dist/ui/schema/client.js +2 -2
  115. package/dist/utils/document/process.js +5 -5
  116. package/dist/utils/pages/preset-auto.js +5 -4
  117. package/dist/utils/schema/index.d.ts +4 -0
  118. package/dist/utils/schema/to-string.js +11 -8
  119. package/package.json +16 -19
  120. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.7/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -1
  121. /package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -0
  122. /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/index.js +0 -0
  123. /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -0
  124. /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst.js +0 -0
  125. /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/index.js +0 -0
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { useTranslations } from "../client/i18n.js";
3
2
  import { cn } from "../../utils/cn.js";
3
+ import { useTranslations } from "../client/i18n.js";
4
4
  import { createContext, use, useMemo, useRef, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Check, Copy } from "lucide-react";
@@ -1,10 +1,10 @@
1
1
  import { idToTitle } from "../../utils/id-to-title.js";
2
2
  import { createMethod, methodKeys } from "../../utils/schema/index.js";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { Badge, MethodLabel } from "../components/method-label.js";
3
5
  import { isMediaTypeSupported } from "../../requests/media/resolve-adapter.js";
4
6
  import "../../requests/media/adapter.js";
5
7
  import { I18nLabel } from "../client/i18n.js";
6
- import { cn } from "../../utils/cn.js";
7
- import { Badge, MethodLabel } from "../components/method-label.js";
8
8
  import { CopyTypeScriptPanel, OperationProvider } from "./client.js";
9
9
  import { Schema } from "../schema/index.js";
10
10
  import { AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Accordions } from "../components/accordion.js";
@@ -1,6 +1,6 @@
1
1
  import { resolveRequestData } from "../../utils/url.js";
2
- import { I18nLabel } from "../client/i18n.js";
3
2
  import { MethodLabel } from "../components/method-label.js";
3
+ import { I18nLabel } from "../client/i18n.js";
4
4
  import { AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Accordions } from "../components/accordion.js";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "fumadocs-ui/components/tabs";
@@ -56,7 +56,7 @@ function UsageTab({ id, lang, _client }) {
56
56
  }, [addListener, removeListener]);
57
57
  const code = useMemo(() => {
58
58
  if (!data) return;
59
- const url = joinURL(withBase(server ? resolveServerUrl(server.url, server.variables) : "/", typeof window !== "undefined" ? window.location.origin : "https://loading"), resolveRequestData(route, data));
59
+ const url = joinURL(server && typeof window !== "undefined" ? withBase(resolveServerUrl(server.url, server.variables), window.location.origin) : "https://example.com", resolveRequestData(route, data));
60
60
  if (_client) {
61
61
  const { generate, serverContext } = _client;
62
62
  if (typeof generate === "string") return generate;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { useTranslations } from "../client/i18n.js";
3
2
  import { cn } from "../../utils/cn.js";
4
3
  import { Badge } from "../components/method-label.js";
4
+ import { useTranslations } from "../client/i18n.js";
5
5
  import { Fragment, Suspense, createContext, use, useCallback, useDeferredValue, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
6
6
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { cva } from "class-variance-authority";
7
8
  import { ChevronDown, FilterIcon } from "lucide-react";
8
9
  import { buttonVariants } from "fumadocs-ui/components/ui/button";
9
- import { cva } from "class-variance-authority";
10
10
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "fumadocs-ui/components/ui/collapsible";
11
11
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "fumadocs-ui/components/tabs";
12
12
  import { Popover, PopoverContent, PopoverTrigger } from "fumadocs-ui/components/ui/popover";
@@ -1,8 +1,8 @@
1
- import { bundle } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.7/node_modules/@scalar/json-magic/dist/bundle/bundle.js";
2
- import { upgrade } from "../../node_modules/.pnpm/@scalar_openapi-upgrader@0.2.5/node_modules/@scalar/openapi-upgrader/dist/upgrade.js";
3
- import { fetchUrls } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.7/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js";
4
- import { readFiles } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.7/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js";
5
- import "../../node_modules/.pnpm/@scalar_json-magic@0.12.7/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js";
1
+ import { bundle } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/bundle.js";
2
+ import { upgrade } from "../../node_modules/.pnpm/@scalar_openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/upgrade.js";
3
+ import { fetchUrls } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js";
4
+ import { readFiles } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js";
5
+ import "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js";
6
6
  import { dereferenceDocument } from "./dereference.js";
7
7
  //#region src/utils/document/process.ts
8
8
  /**
@@ -58,17 +58,18 @@ function createAutoPreset(options) {
58
58
  tags = ["unknown"];
59
59
  }
60
60
  for (const tag of tags) {
61
+ const res = builder.fromTagName(tag);
62
+ if (!res) continue;
61
63
  const groupName = slugify(tag);
62
- const { displayName, info } = builder.fromTagName(tag);
63
64
  let group = groups.get(groupName);
64
65
  if (!group) {
65
66
  group = {
66
67
  type: "group",
67
68
  info: {
68
- title: displayName,
69
- description: info.description
69
+ title: res.displayName,
70
+ description: res.info.description
70
71
  },
71
- tag: info,
72
+ tag: res.info,
72
73
  entries: [],
73
74
  schemaId: builder.id,
74
75
  path: groupName
@@ -5,6 +5,10 @@ import { JSONSchema } from "json-schema-typed/draft-2020-12";
5
5
  type NoReference<T> = T extends (infer I)[] ? NoReference<I>[] : T extends ReferenceObject ? Exclude<T, ReferenceObject> : T extends object ? { [K in keyof T]: NoReference<T[K]> } : T;
6
6
  type ParsedSchema = (JSONSchema & {
7
7
  'x-playground-lazy'?: boolean;
8
+ discriminator?: {
9
+ propertyName?: string;
10
+ mapping?: Record<string, string>;
11
+ };
8
12
  }) | boolean;
9
13
  interface SecurityEntry {
10
14
  scopes: string[];
@@ -9,14 +9,18 @@ function schemaToString(value, _resolver, flags = 0) {
9
9
  };
10
10
  function union(union, sep, flags) {
11
11
  const members = /* @__PURE__ */ new Set();
12
+ const out = [];
12
13
  let nullable = false;
13
14
  for (const item of union) {
14
15
  const result = run(item, flags | 1);
15
16
  if (result === "null") nullable = true;
16
- else if (result !== "unknown") members.add(result);
17
+ else if (result !== "unknown" && !members.has(result)) {
18
+ out.push(result);
19
+ members.add(result);
20
+ }
17
21
  }
18
- const result = Array.from(members).join(sep);
19
- return nullable ? `${result} | null` : result;
22
+ if (nullable) out.push("null");
23
+ return out.join(sep);
20
24
  }
21
25
  function run(input, flags) {
22
26
  const { dereferenced: schema, raw } = resolver(input);
@@ -34,14 +38,13 @@ function schemaToString(value, _resolver, flags = 0) {
34
38
  type
35
39
  })), " | ", flags);
36
40
  if (schema.type === "array") return `array<${schema.items ? run(schema.items, flags | 1) : "unknown"}>`;
37
- const or = schema.oneOf ?? schema.anyOf;
38
41
  if (schema.oneOf && schema.anyOf) return `(${union(schema.oneOf, " | ", flags)}) & (${union(schema.anyOf, " | ", flags)})`;
39
- else if (or) return union(or, " | ", flags);
42
+ const or = schema.oneOf ?? schema.anyOf;
43
+ if (or) return union(or, " | ", flags);
40
44
  if (schema.allOf) return union(schema.allOf, " & ", flags);
41
- if (schema.not) return `not ${run(schema.not, flags)}`;
45
+ if (schema.not) return `not (${run(schema.not, flags)})`;
42
46
  if (schema.type === "string" && schema.format === "binary") return "file";
43
- if (schema.type && Array.isArray(schema.type)) return schema.type.filter((v) => v !== "null").join(" | ");
44
- if (schema.type) return schema.type;
47
+ if (typeof schema.type === "string") return schema.type;
45
48
  return "unknown";
46
49
  }
47
50
  return run(value, flags);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "10.8.0",
3
+ "version": "10.8.2",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "Docs",
@@ -15,9 +15,6 @@
15
15
  "dist"
16
16
  ],
17
17
  "type": "module",
18
- "main": "./dist/index.js",
19
- "module": "./dist/index.js",
20
- "types": "./dist/index.d.ts",
21
18
  "exports": {
22
19
  ".": "./dist/index.js",
23
20
  "./i18n": "./dist/i18n.js",
@@ -48,13 +45,13 @@
48
45
  "@radix-ui/react-dialog": "^1.1.15",
49
46
  "@radix-ui/react-select": "^2.2.6",
50
47
  "@radix-ui/react-slot": "^1.2.4",
51
- "ajv": "^8.18.0",
48
+ "ajv": "^8.20.0",
52
49
  "chokidar": "^5.0.0",
53
50
  "class-variance-authority": "^0.7.1",
54
51
  "github-slugger": "^2.0.0",
55
52
  "hast-util-to-jsx-runtime": "^2.3.6",
56
53
  "js-yaml": "^4.1.1",
57
- "lucide-react": "^1.8.0",
54
+ "lucide-react": "^1.14.0",
58
55
  "remark": "^15.0.1",
59
56
  "remark-rehype": "^11.1.2",
60
57
  "shiki": "^4.0.2",
@@ -65,18 +62,18 @@
65
62
  "devDependencies": {
66
63
  "@fastify/deepmerge": "^3.2.1",
67
64
  "@scalar/api-client-react": "2.0.1",
68
- "@scalar/json-magic": "^0.12.7",
69
- "@scalar/openapi-upgrader": "^0.2.5",
65
+ "@scalar/json-magic": "^0.12.12",
66
+ "@scalar/openapi-upgrader": "^0.2.7",
67
+ "@tailwindcss/oxide": "^4.3.0",
70
68
  "@types/js-yaml": "^4.0.9",
71
- "@types/node": "25.6.0",
69
+ "@types/node": "25.6.2",
72
70
  "@types/react": "^19.2.14",
73
71
  "fast-content-type-parse": "^3.0.0",
74
72
  "json-schema-typed": "^8.0.2",
75
- "tailwindcss": "^4.2.2",
76
- "tsdown": "0.21.9",
77
- "@fumadocs/tailwind": "0.0.5",
78
- "fumadocs-core": "16.8.1",
79
- "fumadocs-ui": "16.8.1",
73
+ "tailwindcss": "^4.3.0",
74
+ "tsdown": "0.22.0",
75
+ "fumadocs-core": "16.8.9",
76
+ "fumadocs-ui": "16.8.9",
80
77
  "tsconfig": "0.0.0"
81
78
  },
82
79
  "peerDependencies": {
@@ -101,15 +98,15 @@
101
98
  },
102
99
  "inlinedDependencies": {
103
100
  "@fastify/deepmerge": "3.2.1",
104
- "@scalar/helpers": "0.5.1",
105
- "@scalar/json-magic": "0.12.7",
106
- "@scalar/openapi-upgrader": "0.2.5",
101
+ "@scalar/helpers": "0.6.0",
102
+ "@scalar/json-magic": "0.12.12",
103
+ "@scalar/openapi-upgrader": "0.2.7",
107
104
  "fast-content-type-parse": "3.0.0",
108
105
  "pathe": "2.0.3",
109
- "yaml": "2.8.3"
106
+ "yaml": "2.8.4"
110
107
  },
111
108
  "scripts": {
112
- "build": "tsdown --config-loader unrun",
109
+ "build": "tsdown",
113
110
  "clean": "rimraf dist",
114
111
  "dev": "tsdown --watch --clean false",
115
112
  "lint": "oxlint .",
@@ -1 +0,0 @@
1
- import "../../../../../../../../yaml@2.8.3/node_modules/yaml/browser/index.js";