Mintlify setup and configuration
pnpm run dev
command from a terminal within the docs
directory.
Item | Description |
---|---|
api | Automatically generated files (except for Introduction.mdx) |
mint.json | Mintlify configuration object |
package.json | Scripts needed in the monorepo/for generating the API files |
@mintlify/scraping
package, we can scrape our FastAPI’s OpenAPI schema to generate an interactive API documentation site.
generate-api
scripts within the package.json
to generate the required MDX
files. There are two scripts here, one configured to use the production
OpenAPI.json
and the second configured to use the development version.Add new MDX files to navigation
@mintlify/scraping
helpfully outputs the suggested navigation to the terminal:mint.json
under the navigation
object:Add OpenAPI endpoint to `mint.json`
openapi
key to your mint.json
. This, preferably, can be linked to your published OpenAPI schema:openapi.json
file in the docs
root. Manually copy and paste/save your openapi.json
into this file.