fumadocs-openapi 8.1.7 → 8.1.9

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;AAmBjB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAK1D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,KAAK,CAAC;CAC3C;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,CA+Kf"}
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;AAmBjB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAK1D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,KAAK,CAAC;CAC3C;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,CA2Kf"}
@@ -43,7 +43,7 @@ export function Operation({ type = 'operation', path, method, ctx, hasHead, head
43
43
  }
44
44
  if (method.responses && ctx.showResponseSchema !== false) {
45
45
  const statuses = Object.keys(method.responses);
46
- responseNode = (_jsxs(_Fragment, { children: [heading(headingLevel, 'Response Body', ctx), _jsx(Tabs, { items: statuses, groupId: "fumadocs_openapi_responses", className: "bg-transparent", children: statuses.map((status) => (_jsx(ResponseTab, { status: status, operation: method, ctx: ctx }, status))) })] }));
46
+ responseNode = (_jsxs(_Fragment, { children: [heading(headingLevel, 'Response Body', ctx), _jsx(Tabs, { items: statuses, groupId: "fumadocs_openapi_responses", children: statuses.map((status) => (_jsx(ResponseTab, { status: status, operation: method, ctx: ctx }, status))) })] }));
47
47
  }
48
48
  const parameterNode = Object.entries(ParamTypes).map(([type, title]) => {
49
49
  const params = method.parameters?.filter((param) => param.in === type);
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/render/schema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiB7C,UAAU,OAAO;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IAEzB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,WAAkB,EAClB,GAAG,GACJ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IAEvB;;;;SAIK;IACL,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,GAAG,EAAE,OAAO,CAAC;CACd,GAAG,SAAS,CA+MZ"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/render/schema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiB7C,UAAU,OAAO;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IAEzB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,WAAkB,EAClB,GAAG,GACJ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IAEvB;;;;SAIK;IACL,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,GAAG,EAAE,OAAO,CAAC;CACd,GAAG,SAAS,CAgNZ"}
@@ -97,16 +97,17 @@ export function Schema({ name, schema, required = false, parseObject = true, ctx
97
97
  if (schema.type === 'array' && schema.items)
98
98
  mentionedObjectTypes.push(schema.items);
99
99
  mentionedObjectTypes = mentionedObjectTypes.filter((s) => isComplexType(s) && !stack.includes(s));
100
- footer = (_jsx("div", { className: "flex flex-col gap-2", children: mentionedObjectTypes.map((s, idx) => {
101
- let title = typeof s === 'object' ? s.title : null;
102
- title ?? (title = mentionedObjectTypes.length === 1
103
- ? 'Show Attributes'
104
- : `Object ${idx + 1}`);
105
- return (_jsx(renderer.ObjectCollapsible, { name: title, children: _jsx(Schema, { name: "element", schema: s, ctx: {
106
- ...ctx,
107
- stack: [schema, ...stack],
108
- } }) }, idx));
109
- }) }));
100
+ if (mentionedObjectTypes.length > 0)
101
+ footer = (_jsx("div", { className: "flex flex-col gap-2", children: mentionedObjectTypes.map((s, idx) => {
102
+ let title = typeof s === 'object' ? s.title : null;
103
+ title ?? (title = mentionedObjectTypes.length === 1
104
+ ? 'Show Attributes'
105
+ : `Object ${idx + 1}`);
106
+ return (_jsx(renderer.ObjectCollapsible, { name: title, children: _jsx(Schema, { name: "element", schema: s, ctx: {
107
+ ...ctx,
108
+ stack: [schema, ...stack],
109
+ } }) }, idx));
110
+ }) }));
110
111
  }
111
112
  return (_jsxs(renderer.Property, { name: name, type: schemaToString(schema), required: required, deprecated: schema.deprecated, children: [schema.description ? _jsx(Markdown, { text: schema.description }) : null, fields.length > 0 ? (_jsx("div", { className: "flex flex-col gap-2", children: fields.map((field) => (_jsxs("span", { children: [field.key, ": ", _jsx("code", { children: field.value })] }, field.key))) })) : null, footer] }));
112
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "8.1.7",
3
+ "version": "8.1.9",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -46,9 +46,9 @@
46
46
  ],
47
47
  "dependencies": {
48
48
  "@fumari/json-schema-to-typescript": "^1.1.3",
49
- "@radix-ui/react-dialog": "^1.1.11",
50
- "@radix-ui/react-select": "^2.2.2",
51
- "@radix-ui/react-slot": "^1.2.0",
49
+ "@radix-ui/react-dialog": "^1.1.13",
50
+ "@radix-ui/react-select": "^2.2.4",
51
+ "@radix-ui/react-slot": "^1.2.2",
52
52
  "@scalar/openapi-parser": "0.10.17",
53
53
  "ajv": "^8.17.1",
54
54
  "class-variance-authority": "^0.7.1",
@@ -61,22 +61,22 @@
61
61
  "react-hook-form": "^7.56.2",
62
62
  "remark": "^15.0.1",
63
63
  "remark-rehype": "^11.1.2",
64
- "shiki": "^3.3.0",
64
+ "shiki": "^3.4.0",
65
65
  "xml-js": "^1.6.11",
66
- "fumadocs-core": "15.2.15",
67
- "fumadocs-ui": "15.2.15"
66
+ "fumadocs-core": "15.3.1",
67
+ "fumadocs-ui": "15.3.1"
68
68
  },
69
69
  "devDependencies": {
70
- "@scalar/api-client-react": "^1.2.31",
70
+ "@scalar/api-client-react": "^1.2.32",
71
71
  "@types/js-yaml": "^4.0.9",
72
- "@types/node": "22.15.3",
72
+ "@types/node": "22.15.12",
73
73
  "@types/openapi-sampler": "^1.0.3",
74
- "@types/react": "^19.1.2",
74
+ "@types/react": "^19.1.3",
75
75
  "json-schema-typed": "^8.0.1",
76
76
  "next": "15.3.1",
77
77
  "openapi-types": "^12.1.3",
78
78
  "tailwindcss": "^4.1.5",
79
- "tsc-alias": "^1.8.15",
79
+ "tsc-alias": "^1.8.16",
80
80
  "eslint-config-custom": "0.0.0",
81
81
  "tsconfig": "0.0.0"
82
82
  },