Docs: Improve OpenAPI Integration section

This commit is contained in:
fuma-nama
2024-06-17 09:23:44 +08:00
parent 1c3a12780d
commit bcc05d6765
3 changed files with 42 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-openapi': patch
---
Fix docs typo
+36 -1
View File
@@ -32,6 +32,41 @@ Generate docs with the script:
node ./scripts/generate-docs.mjs
```
### Demo
## Options
### Input
An array of input files (path), wildcard allowed.
### Output
Path to the output directory.
### Per
Customise how the page is generated, default to `file`.
| mode | description |
| ---- | ------------------------------- |
| tag | Generate a page for each tag |
| file | Generate a page for each schema |
### Name
A function that controls the output path of files.
### Render
Customise the docs generation process.
#### `render`
A function to inject custom properties to MDX output.
#### `componentsImportPath`
The import path of your API components, it must exports all components in `fumadocs-ui/components/api`.
## Demo
[View demo](/docs/ui/museum).
+1 -1
View File
@@ -20,7 +20,7 @@ export interface Config {
*
* file: Generate a page for each schema
*
* @defaultValue tag
* @defaultValue file
*/
per?: 'tag' | 'file';