fumadocs-openapi 9.3.10 → 9.3.12

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.
@@ -222,7 +222,10 @@ function writeIndexFiles(context, options) {
222
222
  const { data } = matter(file.content);
223
223
  if (typeof data.title !== 'string')
224
224
  continue;
225
- content.push(`<Card href="${urlFn(file.path)}" title=${JSON.stringify(data.title)} description=${JSON.stringify(data.description)} />`);
225
+ const descriptionAttr = data.description
226
+ ? `description=${JSON.stringify(data.description)} `
227
+ : '';
228
+ content.push(`<Card href="${urlFn(file.path)}" title=${JSON.stringify(data.title)} ${descriptionAttr}/>`);
226
229
  }
227
230
  content.push('</Cards>');
228
231
  return generateDocument({
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/render/schema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAe7C,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,QAAgB,EAChB,SAAiB,EACjB,EAAe,EACf,GAAG,EAAE,aAAa,GACnB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAEzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,aAAa,CAAC;CACpB,GAAG,SAAS,CA+TZ"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/render/schema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAe7C,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,QAAgB,EAChB,SAAiB,EACjB,EAAe,EACf,GAAG,EAAE,aAAa,GACnB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAEzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,aAAa,CAAC;CACpB,GAAG,SAAS,CA4UZ"}
@@ -95,6 +95,12 @@ export function Schema({ name, schema, required = false, readOnly = false, write
95
95
  key: 'Properties',
96
96
  value: range,
97
97
  });
98
+ range = getRange('items', schema.minItems, undefined, schema.maxItems, undefined);
99
+ if (range)
100
+ fields.push({
101
+ key: 'Items',
102
+ value: range,
103
+ });
98
104
  if (schema.enum) {
99
105
  fields.push({
100
106
  key: 'Value in',
@@ -1 +1 @@
1
- {"version":3,"file":"process-document.d.ts","sourceRoot":"","sources":["../../src/utils/process-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5D,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEpC;;OAEG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAE/C,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAIF,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GACxD,OAAO,CAAC,iBAAiB,CAAC,CAS5B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GACxD,OAAO,CAAC,iBAAiB,CAAC,CA+B5B"}
1
+ {"version":3,"file":"process-document.d.ts","sourceRoot":"","sources":["../../src/utils/process-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5D,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEpC;;OAEG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAE/C,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAIF,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GACxD,OAAO,CAAC,iBAAiB,CAAC,CAS5B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GACxD,OAAO,CAAC,iBAAiB,CAAC,CAqC5B"}
@@ -25,7 +25,13 @@ export async function processDocument(input) {
25
25
  throw new Error(`Failed to resolve ${node.$ref}`);
26
26
  },
27
27
  },
28
- }).then((v) => upgrade(v).specification);
28
+ })
29
+ .then((v) => upgrade(v).specification)
30
+ .catch((e) => {
31
+ throw new Error(`[OpenAPI] Failed to resolve input: ${input}`, {
32
+ cause: e,
33
+ });
34
+ });
29
35
  /**
30
36
  * Dereferenced value and its original `$ref` value
31
37
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "9.3.10",
3
+ "version": "9.3.12",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -50,8 +50,8 @@
50
50
  "@radix-ui/react-dialog": "^1.1.15",
51
51
  "@radix-ui/react-select": "^2.2.6",
52
52
  "@radix-ui/react-slot": "^1.2.3",
53
- "@scalar/json-magic": "^0.4.2",
54
- "@scalar/openapi-parser": "0.20.5",
53
+ "@scalar/json-magic": "^0.5.1",
54
+ "@scalar/openapi-parser": "0.21.1",
55
55
  "ajv": "^8.17.1",
56
56
  "class-variance-authority": "^0.7.1",
57
57
  "github-slugger": "^2.0.0",
@@ -60,18 +60,18 @@
60
60
  "js-yaml": "^4.1.0",
61
61
  "next-themes": "^0.4.6",
62
62
  "openapi-sampler": "^1.6.1",
63
- "react-hook-form": "^7.62.0",
63
+ "react-hook-form": "^7.63.0",
64
64
  "remark": "^15.0.1",
65
65
  "remark-rehype": "^11.1.2",
66
66
  "tinyglobby": "^0.2.15",
67
67
  "xml-js": "^1.6.11",
68
- "fumadocs-ui": "15.7.13",
69
- "fumadocs-core": "15.7.13"
68
+ "fumadocs-core": "15.8.0",
69
+ "fumadocs-ui": "15.8.0"
70
70
  },
71
71
  "devDependencies": {
72
- "@scalar/api-client-react": "^1.3.37",
72
+ "@scalar/api-client-react": "^1.3.40",
73
73
  "@types/js-yaml": "^4.0.9",
74
- "@types/node": "24.3.3",
74
+ "@types/node": "24.5.2",
75
75
  "@types/openapi-sampler": "^1.0.3",
76
76
  "@types/react": "^19.1.13",
77
77
  "json-schema-typed": "^8.0.1",