fumadocs-openapi 12.5.4 → 12.5.6
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.
- package/css/generated/shared.css +1 -1
- package/dist/.translations/index.d.ts +6 -3
- package/dist/.translations/keys.js +6 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/generate-file.d.ts +1 -3
- package/dist/generate-file.js +3 -3
- package/dist/i18n.d.ts +1 -3
- package/dist/i18n.js +1 -2
- package/dist/index.browser.d.ts +0 -2
- package/dist/index.browser.js +1 -2
- package/dist/node_modules/.pnpm/fast-content-type-parse@4.0.1/node_modules/fast-content-type-parse/index.js +1 -2
- package/dist/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/array-helper.js +1 -2
- package/dist/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/js2xml.js +1 -2
- package/dist/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/options-helper.js +1 -2
- package/dist/operation.d.ts +1 -3
- package/dist/operation.js +1 -2
- package/dist/packages/shared-api/dist/.translations/index.d.ts +2 -5
- package/dist/packages/shared-api/dist/.translations/keys.js +2 -2
- package/dist/packages/shared-api/dist/auto-anchor/index.js +1 -2
- package/dist/packages/shared-api/dist/codegen.d.ts +0 -3
- package/dist/packages/shared-api/dist/codegen.js +1 -2
- package/dist/packages/shared-api/dist/components/badge.js +1 -2
- package/dist/packages/shared-api/dist/components/collapsible.js +1 -2
- package/dist/packages/shared-api/dist/components/copy-typescript.js +1 -2
- package/dist/packages/shared-api/dist/components/defaults.d.ts +2 -4
- package/dist/packages/shared-api/dist/components/defaults.js +21 -21
- package/dist/packages/shared-api/dist/components/dialog.js +1 -2
- package/dist/packages/shared-api/dist/components/example.js +3 -3
- package/dist/packages/shared-api/dist/components/playground/fields.js +27 -9
- package/dist/packages/shared-api/dist/components/playground/json-editor.js +1 -2
- package/dist/packages/shared-api/dist/components/playground/panels.js +1 -2
- package/dist/packages/shared-api/dist/components/playground/param-input.js +1 -2
- package/dist/packages/shared-api/dist/components/playground/result.js +1 -2
- package/dist/packages/shared-api/dist/components/playground/schema.js +1 -2
- package/dist/packages/shared-api/dist/components/playground/server-select.js +1 -2
- package/dist/packages/shared-api/dist/components/schema/client.d.ts +1 -4
- package/dist/packages/shared-api/dist/components/schema/client.js +3 -2
- package/dist/packages/shared-api/dist/components/schema/index.d.ts +0 -3
- package/dist/packages/shared-api/dist/components/schema/index.js +1 -2
- package/dist/packages/shared-api/dist/components/segmented.js +1 -2
- package/dist/packages/shared-api/dist/components/select-tab.js +1 -2
- package/dist/packages/shared-api/dist/components/select.js +1 -2
- package/dist/packages/shared-api/dist/components/spinner.js +1 -2
- package/dist/packages/shared-api/dist/i18n.js +1 -2
- package/dist/packages/shared-api/dist/source.d.ts +1 -4
- package/dist/packages/shared-api/dist/source.js +1 -2
- package/dist/packages/shared-api/dist/utils/document-cache.js +1 -2
- package/dist/packages/shared-api/dist/utils/id-to-title.js +1 -2
- package/dist/packages/shared-api/dist/utils/is-plain-object.js +1 -2
- package/dist/packages/shared-api/dist/utils/url.js +1 -2
- package/dist/packages/shared-api/dist/utils/use-query.js +1 -2
- package/dist/packages/shared-api/dist/utils/use-server-store.js +1 -2
- package/dist/playground/auth.d.ts +2 -2
- package/dist/playground/auth.js +1 -2
- package/dist/playground/fetcher.d.ts +1 -3
- package/dist/playground/fetcher.js +1 -2
- package/dist/playground/use-playground.d.ts +1 -3
- package/dist/playground/use-playground.js +1 -2
- package/dist/requests/generators/all.d.ts +1 -3
- package/dist/requests/generators/all.js +1 -2
- package/dist/requests/generators/csharp.d.ts +1 -3
- package/dist/requests/generators/csharp.js +1 -2
- package/dist/requests/generators/curl.d.ts +1 -3
- package/dist/requests/generators/curl.js +1 -2
- package/dist/requests/generators/go.d.ts +1 -3
- package/dist/requests/generators/go.js +1 -2
- package/dist/requests/generators/index.d.ts +1 -3
- package/dist/requests/generators/index.js +1 -2
- package/dist/requests/generators/java.d.ts +1 -3
- package/dist/requests/generators/java.js +1 -2
- package/dist/requests/generators/javascript.d.ts +1 -3
- package/dist/requests/generators/javascript.js +1 -2
- package/dist/requests/generators/python.d.ts +1 -3
- package/dist/requests/generators/python.js +1 -2
- package/dist/requests/generators/rust.d.ts +1 -3
- package/dist/requests/generators/rust.js +1 -2
- package/dist/requests/media/adapter.d.ts +0 -2
- package/dist/requests/media/adapter.js +1 -2
- package/dist/requests/media/encode.d.ts +1 -3
- package/dist/requests/media/encode.js +1 -2
- package/dist/requests/media/resolve-adapter.d.ts +1 -3
- package/dist/requests/media/resolve-adapter.js +1 -2
- package/dist/requests/string-utils.js +1 -2
- package/dist/requests/types.d.ts +1 -3
- package/dist/server/index.d.ts +0 -2
- package/dist/server/index.js +1 -2
- package/dist/server/oauth.d.ts +1 -3
- package/dist/server/oauth.js +1 -2
- package/dist/server/proxy.d.ts +0 -2
- package/dist/server/proxy.js +8 -4
- package/dist/types/openapi.d.ts +1 -3
- package/dist/types.d.ts +1 -3
- package/dist/ui/base.d.ts +1 -6
- package/dist/ui/base.js +1 -2
- package/dist/ui/components/codeblock.js +1 -2
- package/dist/ui/components/endpoint.js +1 -2
- package/dist/ui/components/heading.js +1 -2
- package/dist/ui/components/markdown.js +1 -2
- package/dist/ui/components/method-label.js +1 -2
- package/dist/ui/components/schema.js +1 -2
- package/dist/ui/index.d.ts +0 -2
- package/dist/ui/index.js +1 -2
- package/dist/ui/operation/index.js +14 -5
- package/dist/ui/operation/usage-tabs.js +12 -5
- package/dist/ui/playground/client.d.ts +6 -5
- package/dist/ui/playground/client.js +1 -2
- package/dist/ui/playground/components/auth.js +1 -2
- package/dist/ui/playground/components/request-panel.d.ts +8 -0
- package/dist/ui/playground/components/request-panel.js +18 -8
- package/dist/ui/playground/components/response-panel.js +1 -2
- package/dist/ui/playground/components/result-display.d.ts +1 -3
- package/dist/ui/playground/components/result-display.js +1 -2
- package/dist/ui/playground/components/server-select.js +1 -2
- package/dist/ui/playground/components/url-bar.js +1 -2
- package/dist/ui/scalar/client.js +1 -2
- package/dist/ui/scalar/index.d.ts +1 -3
- package/dist/ui/scalar/index.js +1 -2
- package/dist/utils/create-page.d.ts +10 -9
- package/dist/utils/create-page.js +14 -8
- package/dist/utils/document/dereference.d.ts +1 -3
- package/dist/utils/document/dereference.js +1 -2
- package/dist/utils/document/load.js +1 -2
- package/dist/utils/get-example-requests.js +4 -4
- package/dist/utils/pages/builder.d.ts +0 -2
- package/dist/utils/pages/builder.js +1 -2
- package/dist/utils/pages/preset-auto.d.ts +0 -2
- package/dist/utils/pages/preset-auto.js +1 -2
- package/dist/utils/pages/to-static-data.d.ts +1 -3
- package/dist/utils/pages/to-static-data.js +1 -2
- package/dist/utils/pages/to-text.d.ts +1 -3
- package/dist/utils/pages/to-text.js +1 -2
- package/dist/utils/schema.js +1 -2
- package/dist/utils/use-server.d.ts +0 -2
- package/dist/utils/use-server.js +1 -2
- package/package.json +12 -13
package/dist/utils/schema.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { idToTitle } from "../packages/shared-api/dist/utils/id-to-title.js";
|
|
2
2
|
import { getRaw } from "@scalar/json-magic/magic-proxy";
|
|
3
3
|
import { dereference } from "@fumadocs/json-schema";
|
|
4
|
-
|
|
4
|
+
// src/utils/schema.ts
|
|
5
5
|
const methodKeys = [
|
|
6
6
|
"get",
|
|
7
7
|
"post",
|
|
@@ -39,5 +39,4 @@ function pickExample(value) {
|
|
|
39
39
|
function getExampleValue(example) {
|
|
40
40
|
return getRaw(example.dataValue ?? example.value);
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { getExampleValue, getPreferredType, getTagDisplayName, methodKeys, pickExample };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ServerObject } from "../types.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
//#region src/utils/use-server.d.ts
|
|
4
3
|
export interface SelectedServer {
|
|
5
4
|
url: string;
|
|
6
5
|
name?: string;
|
|
@@ -21,5 +20,4 @@ interface ServerContextType {
|
|
|
21
20
|
setServerVariables: (value: Record<string, string>) => void;
|
|
22
21
|
}
|
|
23
22
|
export declare function useServer(): ServerContextType;
|
|
24
|
-
//#endregion
|
|
25
23
|
export {};
|
package/dist/utils/use-server.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useServerStore } from "../packages/shared-api/dist/utils/use-server-sto
|
|
|
3
3
|
import { joinURL, resolveServerUrl } from "../packages/shared-api/dist/utils/url.js";
|
|
4
4
|
import { createContext, use, useCallback, useMemo, useSyncExternalStore } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/utils/use-server.tsx
|
|
7
7
|
const ServerContext = createContext(null);
|
|
8
8
|
const keyOfServer = (server) => server.url;
|
|
9
9
|
const noop = () => () => {};
|
|
@@ -53,5 +53,4 @@ function getDefaultValues(server) {
|
|
|
53
53
|
for (const [k, v] of Object.entries(server.variables)) if (v.default !== void 0) out[k] = String(v.default);
|
|
54
54
|
return out;
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
export { ServerProvider, useServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-openapi",
|
|
3
|
-
"version": "12.5.
|
|
3
|
+
"version": "12.5.6",
|
|
4
4
|
"description": "Generate MDX docs for your OpenAPI spec",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -54,35 +54,34 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@base-ui/react": "^1.9.0",
|
|
56
56
|
"@fuma-translate/react": "^1.0.2",
|
|
57
|
-
"@fumadocs/json-schema": "^0.3.
|
|
57
|
+
"@fumadocs/json-schema": "^0.3.5",
|
|
58
58
|
"@fumari/json-schema-ts": "^1.0.2",
|
|
59
59
|
"@fumari/stf": "^1.1.2",
|
|
60
|
-
"@scalar/json-magic": "^0.16.
|
|
60
|
+
"@scalar/json-magic": "^0.16.1",
|
|
61
61
|
"@scalar/openapi-upgrader": "^0.4.5",
|
|
62
|
-
"chokidar": "^
|
|
62
|
+
"chokidar": "^6.0.0",
|
|
63
63
|
"class-variance-authority": "^0.7.1",
|
|
64
64
|
"cn": "^0.5.0",
|
|
65
65
|
"github-slugger": "^2.0.0",
|
|
66
|
-
"
|
|
67
|
-
"lucide-react": "^1.59.0",
|
|
66
|
+
"lucide-react": "^1.61.0",
|
|
68
67
|
"remark": "^15.0.1",
|
|
69
68
|
"remark-rehype": "^11.1.2",
|
|
70
69
|
"shiki": "^4.5.0",
|
|
71
|
-
"undici": "^8.12.
|
|
70
|
+
"undici": "^8.12.3",
|
|
72
71
|
"yaml": "^2.9.1"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|
|
75
|
-
"@scalar/api-client-react": "^2.0.
|
|
74
|
+
"@scalar/api-client-react": "^2.0.59",
|
|
76
75
|
"@tailwindcss/oxide": "^4.3.3",
|
|
77
76
|
"@types/node": "26.6.5",
|
|
78
77
|
"@types/react": "^19.3.0",
|
|
79
78
|
"@types/react-dom": "^19.3.0",
|
|
80
79
|
"fast-content-type-parse": "^4.0.1",
|
|
81
80
|
"fuma-cli": "^0.3.1",
|
|
82
|
-
"fumadocs-core": "16.17.
|
|
83
|
-
"fumadocs-ui": "npm:@fumadocs/base-ui@16.17.
|
|
81
|
+
"fumadocs-core": "16.17.9",
|
|
82
|
+
"fumadocs-ui": "npm:@fumadocs/base-ui@16.17.9",
|
|
84
83
|
"json-schema-typed": "^9.0.0",
|
|
85
|
-
"shared-api": "0.2.
|
|
84
|
+
"shared-api": "0.2.16",
|
|
86
85
|
"tsconfig": "0.0.0",
|
|
87
86
|
"tsdown": "0.23.1",
|
|
88
87
|
"xml-js": "^1.6.11"
|
|
@@ -90,8 +89,8 @@
|
|
|
90
89
|
"peerDependencies": {
|
|
91
90
|
"@scalar/api-client-react": "^2.0.20",
|
|
92
91
|
"@types/react": "*",
|
|
93
|
-
"fumadocs-core": "^16.
|
|
94
|
-
"fumadocs-ui": "^16.
|
|
92
|
+
"fumadocs-core": "^16.17.8",
|
|
93
|
+
"fumadocs-ui": "^16.17.8",
|
|
95
94
|
"json-schema-typed": "*",
|
|
96
95
|
"react": "^19.2.0",
|
|
97
96
|
"react-dom": "^19.2.0"
|