fumadocs-openapi 7.0.6 → 7.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/operation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAEV,iBAAiB,EAEjB,aAAa,EAEd,MAAM,SAAS,CAAC;AAgBjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EACH,MAAM,GACN,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,SAAS,CAAC,GACxD,KAAK,CAAC;CACX;AASD,wBAAgB,SAAS,CAAC,EACxB,IAAkB,EAClB,IAAI,EACJ,MAAM,EACN,GAAG,EACH,OAAO,EACP,YAAgB,GACjB,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,GAAG,EAAE,aAAa,CAAC;IAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,YAAY,CAkLf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/operation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAEV,iBAAiB,EAEjB,aAAa,EAEd,MAAM,SAAS,CAAC;AAgBjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EACH,MAAM,GACN,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,SAAS,CAAC,GACxD,KAAK,CAAC;CACX;AASD,wBAAgB,SAAS,CAAC,EACxB,IAAkB,EAClB,IAAI,EACJ,MAAM,EACN,GAAG,EACH,OAAO,EACP,YAAgB,GACjB,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,GAAG,EAAE,aAAa,CAAC;IAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,YAAY,CAuLf"}
@@ -18,7 +18,6 @@ const ParamTypes = {
18
18
  };
19
19
  export function Operation({ type = 'operation', path, method, ctx, hasHead, headingLevel = 2, }) {
20
20
  const body = method.requestBody;
21
- const security = method.security ?? ctx.schema.document.security;
22
21
  let headNode = null;
23
22
  let bodyNode = null;
24
23
  let responseNode = null;
@@ -79,7 +78,10 @@ export function Operation({ type = 'operation', path, method, ctx, hasHead, head
79
78
  if (method.callbacks) {
80
79
  callbacksNode = (_jsxs(_Fragment, { children: [heading(headingLevel, 'Webhooks', ctx), Object.entries(method.callbacks).map(([name, callback]) => (_jsx(WebhookCallback, { callback: callback, ctx: ctx, headingLevel: headingLevel }, name)))] }));
81
80
  }
82
- const info = (_jsxs(ctx.renderer.APIInfo, { head: headNode, method: method.method, route: path, children: [type === 'operation' ? (ctx.disablePlayground ? (_jsxs("div", { className: "flex flex-row items-center gap-2.5 p-3 rounded-xl border bg-fd-card text-fd-card-foreground not-prose", children: [_jsx(MethodLabel, { className: "text-xs", children: method.method }), _jsx("code", { className: "flex-1 overflow-auto text-nowrap text-[13px] text-fd-muted-foreground", children: path })] })) : (_jsx(ctx.renderer.APIPlayground, { path: path, method: method, ctx: ctx }))) : null, security && Object.keys(security).length > 0 ? (_jsxs(_Fragment, { children: [heading(headingLevel, 'Authorization', ctx), _jsx(AuthSection, { requirements: security, ctx: ctx })] })) : null, bodyNode, parameterNode, responseNode, callbacksNode] }));
81
+ const security = (method.security ??
82
+ ctx.schema.document.security ??
83
+ []).filter((v) => Object.keys(v).length > 0);
84
+ const info = (_jsxs(ctx.renderer.APIInfo, { head: headNode, method: method.method, route: path, children: [type === 'operation' ? (ctx.disablePlayground ? (_jsxs("div", { className: "flex flex-row items-center gap-2.5 p-3 rounded-xl border bg-fd-card text-fd-card-foreground not-prose", children: [_jsx(MethodLabel, { className: "text-xs", children: method.method }), _jsx("code", { className: "flex-1 overflow-auto text-nowrap text-[13px] text-fd-muted-foreground", children: path })] })) : (_jsx(ctx.renderer.APIPlayground, { path: path, method: method, ctx: ctx }))) : null, security.length > 0 ? (_jsxs(_Fragment, { children: [heading(headingLevel, 'Authorization', ctx), _jsx(AuthSection, { requirements: security, ctx: ctx })] })) : null, bodyNode, parameterNode, responseNode, callbacksNode] }));
83
85
  if (type === 'operation') {
84
86
  const examples = getAPIExamples(path, method, ctx);
85
87
  return (_jsx(ctx.renderer.API, { children: _jsxs(APIExampleProvider, { route: path, examples: examples, method: method, children: [info, _jsx(APIExample, { examples: examples, method: method, ctx: ctx })] }) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "7.0.6",
3
+ "version": "7.0.7",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -54,27 +54,27 @@
54
54
  "github-slugger": "^2.0.0",
55
55
  "hast-util-to-jsx-runtime": "^2.3.6",
56
56
  "js-yaml": "^4.1.0",
57
- "lucide-react": "^0.483.0",
57
+ "lucide-react": "^0.485.0",
58
58
  "next-themes": "^0.4.6",
59
59
  "openapi-sampler": "^1.6.1",
60
- "react-hook-form": "^7.54.2",
60
+ "react-hook-form": "^7.55.0",
61
61
  "remark": "^15.0.1",
62
62
  "remark-rehype": "^11.1.1",
63
63
  "shiki": "^3.2.1",
64
64
  "xml-js": "^1.6.11",
65
- "fumadocs-core": "15.1.3",
66
- "fumadocs-ui": "15.1.3"
65
+ "fumadocs-core": "15.2.0",
66
+ "fumadocs-ui": "15.2.0"
67
67
  },
68
68
  "devDependencies": {
69
- "@scalar/api-client-react": "^1.2.7",
69
+ "@scalar/api-client-react": "^1.2.9",
70
70
  "@types/js-yaml": "^4.0.9",
71
- "@types/node": "22.13.11",
71
+ "@types/node": "22.13.14",
72
72
  "@types/openapi-sampler": "^1.0.3",
73
73
  "@types/react": "^19.0.12",
74
- "next": "15.2.3",
74
+ "next": "15.2.4",
75
75
  "openapi-types": "^12.1.3",
76
- "tailwindcss": "^4.0.15",
77
- "tsc-alias": "^1.8.11",
76
+ "tailwindcss": "^4.0.17",
77
+ "tsc-alias": "^1.8.12",
78
78
  "eslint-config-custom": "0.0.0",
79
79
  "tsconfig": "0.0.0"
80
80
  },