fumadocs-openapi 5.4.0 → 5.4.1

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/index.d.ts CHANGED
@@ -223,6 +223,12 @@ interface GenerateOptions {
223
223
  * A `full: true` property will be added by default.
224
224
  */
225
225
  frontmatter?: (title: string, description: string | undefined, context: DocumentContext) => Record<string, unknown>;
226
+ /**
227
+ * Add description to document body
228
+ *
229
+ * @defaultValue false
230
+ */
231
+ includeDescription?: boolean;
226
232
  cwd?: string;
227
233
  }
228
234
  interface GenerateTagOutput {
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ function idToTitle(id) {
79
79
  }
80
80
 
81
81
  function generateDocument(options) {
82
- const { frontmatter } = options;
82
+ const { frontmatter, includeDescription = false } = options;
83
83
  const out = [];
84
84
  const extend = frontmatter?.(options.title, options.description, options.context);
85
85
  let meta;
@@ -106,6 +106,7 @@ function generateDocument(options) {
106
106
  if (imports) {
107
107
  out.push(imports);
108
108
  }
109
+ if (options.description && includeDescription) out.push(options.description);
109
110
  out.push(pageContent(options.page));
110
111
  return out.join('\n\n');
111
112
  }
package/dist/ui/index.js CHANGED
@@ -92,10 +92,10 @@ function API({ className, children, ...props }) {
92
92
  }
93
93
  function Property({ name, type, required, deprecated, children }) {
94
94
  return /*#__PURE__*/ jsxs("div", {
95
- className: "mb-4 flex flex-col rounded-lg border bg-fd-card p-3 prose-no-margin",
95
+ className: "mb-4 rounded-lg border bg-fd-card p-3 prose-no-margin",
96
96
  children: [
97
97
  /*#__PURE__*/ jsxs("h4", {
98
- className: "inline-flex items-center gap-4",
98
+ className: "flex flex-row items-center gap-4",
99
99
  children: [
100
100
  /*#__PURE__*/ jsx("code", {
101
101
  children: name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",