fumadocs-openapi 11.0.1 → 11.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/base.js CHANGED
@@ -29,7 +29,7 @@ function createOpenAPIPageBase({ shiki, shikiOptions = { themes: {
29
29
  if (typeof schema !== "object") return;
30
30
  try {
31
31
  return compile(schema, {
32
- name: "Response",
32
+ name: ctx.name,
33
33
  readOnly: ctx.readOnly,
34
34
  writeOnly: ctx.writeOnly,
35
35
  getSchemaId: ctx.ctx.schema.getRawRef
@@ -0,0 +1,11 @@
1
+ import { CreateOpenAPIPageOptions, OpenAPIPageProps, createOpenAPIPage } from "./index.js";
2
+
3
+ //#region src/ui/create-client.d.ts
4
+ /** @deprecated Use `CreateOpenAPIPageOptions` insteawd */
5
+ type CreateClientAPIPageOptions = CreateOpenAPIPageOptions;
6
+ /** @deprecated Use `OpenAPIPageProps` instead */
7
+ type ClientApiPageProps = OpenAPIPageProps;
8
+ /** @deprecated use `createOpenAPIPage()` from `fumadocs-openapi/ui` instead */
9
+ declare const createClientAPIPage: typeof createOpenAPIPage;
10
+ //#endregion
11
+ export { ClientApiPageProps, CreateClientAPIPageOptions, createClientAPIPage };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { createOpenAPIPage } from "./index.js";
3
+ //#region src/ui/create-client.tsx
4
+ /** @deprecated use `createOpenAPIPage()` from `fumadocs-openapi/ui` instead */
5
+ const createClientAPIPage = createOpenAPIPage;
6
+ //#endregion
7
+ export { createClientAPIPage };
@@ -14,6 +14,7 @@ import { BundledTheme, CodeOptionsThemes, CodeToHastOptionsCommon } from "shiki"
14
14
 
15
15
  //#region src/ui/index.d.ts
16
16
  interface GenerateTypeScriptDefinitionsContext {
17
+ name: string;
17
18
  readOnly: boolean;
18
19
  writeOnly: boolean;
19
20
  ctx: RenderContext;
@@ -384,6 +384,7 @@ function RequestBodyContentItem({ content, method, operation }) {
384
384
  let ts = useMemo(() => {
385
385
  if (!content.schema || !ctx.generateTypeScriptDefinitions) return;
386
386
  return ctx.generateTypeScriptDefinitions(content.schema, {
387
+ name: "RequestBody",
387
388
  readOnly: false,
388
389
  writeOnly: true,
389
390
  ctx
@@ -449,6 +450,7 @@ function RepsonseAccordionItem({ item: { schema } }) {
449
450
  let ts = useMemo(() => {
450
451
  if (!schema || !ctx.generateTypeScriptDefinitions) return;
451
452
  return ctx.generateTypeScriptDefinitions(schema, {
453
+ name: "ResponseBody",
452
454
  readOnly: true,
453
455
  writeOnly: false,
454
456
  ctx
@@ -75,10 +75,10 @@ function UsageTabsSelector() {
75
75
  onValueChange: setKey
76
76
  });
77
77
  function renderItem(item) {
78
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
78
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
79
79
  className: "font-medium text-sm",
80
80
  children: item.name
81
- }), /* @__PURE__ */ jsx("span", {
81
+ }), /* @__PURE__ */ jsx("p", {
82
82
  className: "text-fd-muted-foreground",
83
83
  children: item.description
84
84
  })] });
@@ -90,10 +90,7 @@ function UsageTabsSelector() {
90
90
  onValueChange: setKey,
91
91
  children: [/* @__PURE__ */ jsx(SelectTrigger, {
92
92
  className: "not-prose mb-2",
93
- children: selected && /* @__PURE__ */ jsx(SelectValue, {
94
- asChild: true,
95
- children: renderItem(selected)
96
- })
93
+ children: selected && /* @__PURE__ */ jsx(SelectValue, { children: renderItem(selected) })
97
94
  }), /* @__PURE__ */ jsx(SelectContent, { children: examples.map((item) => /* @__PURE__ */ jsx(SelectItem, {
98
95
  value: item.id,
99
96
  children: renderItem(item)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "11.0.1",
3
+ "version": "11.0.3",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "Docs",
@@ -9,7 +9,10 @@
9
9
  "homepage": "https://fumadocs.dev",
10
10
  "license": "MIT",
11
11
  "author": "Fuma Nama",
12
- "repository": "github:fuma-nama/fumadocs",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "github:fuma-nama/fumadocs"
15
+ },
13
16
  "files": [
14
17
  "css",
15
18
  "dist"
@@ -31,6 +34,7 @@
31
34
  "./server": "./dist/server/index.js",
32
35
  "./ui": "./dist/ui/index.js",
33
36
  "./ui/base": "./dist/ui/base.js",
37
+ "./ui/create-client": "./dist/ui/create-client.js",
34
38
  "./package.json": "./package.json",
35
39
  "./css/*": "./css/*"
36
40
  },
@@ -38,14 +42,14 @@
38
42
  "access": "public"
39
43
  },
40
44
  "dependencies": {
41
- "@fuma-translate/react": "^1.0.1",
45
+ "@fuma-translate/react": "^1.0.2",
42
46
  "@fumari/json-schema-ts": "^0.0.2",
43
47
  "chokidar": "^5.0.0",
44
48
  "class-variance-authority": "^0.7.1",
45
49
  "github-slugger": "^2.0.0",
46
50
  "hast-util-to-jsx-runtime": "^2.3.6",
47
51
  "js-yaml": "^4.2.0",
48
- "lucide-react": "^1.17.0",
52
+ "lucide-react": "^1.20.0",
49
53
  "remark": "^15.0.1",
50
54
  "remark-rehype": "^11.1.2",
51
55
  "shiki": "^4.2.0",
@@ -54,18 +58,18 @@
54
58
  "@fumari/stf": "1.0.5"
55
59
  },
56
60
  "devDependencies": {
57
- "@scalar/api-client-react": "^2.0.24",
61
+ "@scalar/api-client-react": "^2.0.25",
58
62
  "@scalar/openapi-upgrader": "^0.2.9",
59
- "@tailwindcss/oxide": "^4.3.0",
63
+ "@tailwindcss/oxide": "^4.3.1",
60
64
  "@types/js-yaml": "^4.0.9",
61
- "@types/node": "25.9.2",
65
+ "@types/node": "25.9.3",
62
66
  "@types/react": "^19.2.17",
63
67
  "fast-content-type-parse": "^3.0.0",
64
68
  "json-schema-typed": "^8.0.2",
65
- "tsdown": "0.22.2",
69
+ "tsdown": "0.22.3",
66
70
  "xml-js": "^1.6.11",
67
- "fumadocs-core": "16.10.1",
68
- "fumadocs-ui": "16.10.1",
71
+ "fumadocs-core": "16.10.5",
72
+ "fumadocs-ui": "16.10.5",
69
73
  "tsconfig": "0.0.0"
70
74
  },
71
75
  "peerDependencies": {