Configurations
Customise Adalt 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 Adalt UI |
method | Available method of operation (operation mode) |
route | Route of operation (operation mode) |
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.
Last updated on