fumadocs-openapi 9.1.2 → 9.1.4

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.
@@ -65,12 +65,12 @@ async function generateFromDocument(pathOrUrl, options) {
65
65
  await writeFile(file, content);
66
66
  }
67
67
  function getOutputPaths(groupBy = 'none', result) {
68
- const file = nameFn(result, document.document);
69
68
  if (groupBy === 'route') {
70
69
  return [
71
- path.join(result.type === 'operation' ? result.item.path : result.item.name, result.item.method) + '.mdx',
70
+ path.join(getOutputPathFromRoute(result.type === 'operation' ? result.item.path : result.item.name), `${result.item.method.toLowerCase()}.mdx`),
72
71
  ];
73
72
  }
73
+ const file = nameFn(result, document.document);
74
74
  if (groupBy === 'tag') {
75
75
  let tags = result.type === 'operation'
76
76
  ? document.document.paths[result.item.path][result.item.method]
@@ -1 +1 @@
1
- {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/requests/javascript.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEjE,eAAO,MAAM,SAAS,EAAE,eAkDvB,CAAC"}
1
+ {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/requests/javascript.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEjE,eAAO,MAAM,SAAS,EAAE,eAuDvB,CAAC"}
@@ -4,6 +4,10 @@ export const generator = (url, data, { mediaAdapters }) => {
4
4
  const s = [];
5
5
  const options = new Map();
6
6
  const headers = {};
7
+ options.set('method', JSON.stringify(data.method));
8
+ if (data.bodyMediaType) {
9
+ headers['Content-Type'] = data.bodyMediaType;
10
+ }
7
11
  for (const [k, v] of Object.entries(data.header)) {
8
12
  headers[k] = v.value;
9
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "9.1.2",
3
+ "version": "9.1.4",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -61,20 +61,20 @@
61
61
  "react-hook-form": "^7.60.0",
62
62
  "remark": "^15.0.1",
63
63
  "remark-rehype": "^11.1.2",
64
- "shiki": "^3.7.0",
64
+ "shiki": "^3.8.1",
65
65
  "tinyglobby": "^0.2.14",
66
66
  "xml-js": "^1.6.11",
67
- "fumadocs-core": "15.6.3",
68
- "fumadocs-ui": "15.6.3"
67
+ "fumadocs-core": "15.6.5",
68
+ "fumadocs-ui": "15.6.5"
69
69
  },
70
70
  "devDependencies": {
71
- "@scalar/api-client-react": "^1.3.21",
71
+ "@scalar/api-client-react": "^1.3.23",
72
72
  "@types/js-yaml": "^4.0.9",
73
- "@types/node": "24.0.13",
73
+ "@types/node": "24.0.15",
74
74
  "@types/openapi-sampler": "^1.0.3",
75
75
  "@types/react": "^19.1.8",
76
76
  "json-schema-typed": "^8.0.1",
77
- "next": "15.3.5",
77
+ "next": "15.4.2",
78
78
  "openapi-types": "^12.1.3",
79
79
  "tailwindcss": "^4.1.11",
80
80
  "tsc-alias": "^1.8.16",