Configurations
Customise Fumadocs OpenAPI
File Generator
Pass options to the generateFiles
function.
Input
An array of input files. Allowed:
- File Paths
- External URLs
- Wildcard
On Next.js server, the schema is dynamically fetched when the APIPage
component renders.
For Vercel
If the schema is passed as a file path, ensure the page will not be re-rendered after build.
Output
Path to the output directory.
Per
Customise how the page is generated, default to operation
.
mode | Generate a page for |
---|---|
tag | each tag |
file | each schema |
operation | each operation (method of endpoint) |
Group By
In operation
mode, you can group output files with folders.
Group by | Description |
---|---|
tag | {tag}/{page}.mdx (Each operation can only contain 1 tag) |
route | {api-endpoint}/{page}.mdx |
none | {page}.mdx (default) |
Name
A function that controls the output path of files.
Imports
Add additional imports on the top of MDX files.
Frontmatter
Customise the frontmatter of MDX files.
By default, it includes:
property | description |
---|---|
title | Page title |
description | Page description |
full | Always true, added for Fumadocs UI |
method | Available method of operation (operation mode) |
route | Route of operation (operation mode) |
Tag Display Name
Adding x-displayName
to OpenAPI Schema can control the display name of your tags.
OpenAPI Server
The server to render pages.
Generate Code Samples
Generate custom code samples for each API endpoint.
In addition, you can also specify code samples via OpenAPI schema.
Renderer
Customise components in the page.
Advanced
Using API Page
This is not a public API, use it carefully.
To use the APIPage
component in your MDX files:
Prop | Description |
---|---|
document | OpenAPI Schema |
operations | Operations (API endpoints) to be rendered |
hasHead | Enable to render the heading of operation |
Last updated on