fumadocs-openapi 3.1.1 → 3.1.2

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
@@ -55,7 +55,9 @@ interface GenerateOptions {
55
55
  from: string;
56
56
  }[];
57
57
  /**
58
- * Customise frontmatter
58
+ * Customise frontmatter.
59
+ *
60
+ * A `full: true` property will be added by default.
59
61
  */
60
62
  frontmatter?: (title: string, description: string | undefined) => Record<string, unknown>;
61
63
  renderer?: Partial<Renderer>;
package/dist/index.js CHANGED
@@ -102,6 +102,7 @@ function renderPage(title, description, content, options) {
102
102
  const banner = dump({
103
103
  title,
104
104
  description,
105
+ full: true,
105
106
  ...options.frontmatter?.(title, description)
106
107
  }).trim();
107
108
  const finalImports = (options.imports ?? [
@@ -385,7 +386,10 @@ async function renderOperation(path, method, ctx, noTitle = false) {
385
386
  const info = [];
386
387
  const example = [];
387
388
  const title = method.summary ?? method.operationId;
388
- if (title && !noTitle) info.push(heading(level++, title));
389
+ if (title && !noTitle) {
390
+ info.push(heading(level, title));
391
+ level++;
392
+ }
389
393
  if (method.description) info.push(p(method.description));
390
394
  if (security) {
391
395
  info.push(heading(level, "Authorization"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",